Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lokkju
Last active December 4, 2019 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lokkju/9c0990009db1777a623bf96aab535542 to your computer and use it in GitHub Desktop.
Save lokkju/9c0990009db1777a623bf96aab535542 to your computer and use it in GitHub Desktop.

for Nvidia GPU

wget https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.168_418.67_linux.run

sudo sh cuda_10.1.168_418.67_linux.run

Un-check the "Driver" block and then select "Install" and hit "Enter".

┌──────────────────────────────────────────────────────────────────────────────┐ │ CUDA Installer │ │ - [ ] Driver │ │ [ ] 418.67 │ │ + [X] CUDA Toolkit 10.1 │ │ [X] CUDA Samples 10.1 │ │ [X] CUDA Demo Suite 10.1 │ │ [X] CUDA Documentation 10.1 │ │ Install │ │ Options │ │ │ │ │ │ │ │ │ │ Up/Down: Move | Left/Right: Expand | 'Enter': Select | 'A': Advanced options │ └──────────────────────────────────────────────────────────────────────────────┘

#AMD GPU with ROCm opencl

sudo apt update sudo apt full-upgrade -y wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add - echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list sudo apt update

sudo apt install rocm-dev rocm-dkms echo 'SUBSYSTEM=="kfd", KERNEL=="kfd", TAG+="uaccess", GROUP="video"' | sudo tee /etc/udev/rules.d/70-kfd.rules

#Installing xmr-stak sudo apt install libhwloc-dev hwloc git clone https://github.com/fireice-uk/xmr-stak.git

nano xmr-stak/xmrstak/donate-level.hpp change: constexpr double fDevDonationLevel = 2.0 / 100.0; to: constexpr double fDevDonationLevel = 0.0; --> no dev contribution ctrl x

cd ~/xmr-stak nano CMakeLists.txt

#search for the section Find Opencl (i.e. scroll down the file) and #add /opt/rocm/opencl under sections PATHS I added arrows in the code below #to point you at the right direction!

###############################################################################

Find OpenCL

###############################################################################

option(OpenCL_ENABLE "Enable or disable OpenCL spport (AMD GPU support)" ON) if(OpenCL_ENABLE) # try to find AMD OpenCL before NVIDIA OpenCL find_path(OpenCL_INCLUDE_DIR NAMES CL/cl.h OpenCL/cl.h NO_DEFAULT_PATH PATHS ENV "OCL_ROOT" ENV "OpenCL_ROOT" ENV AMDAPPSDKROOT ENV ATISTREAMSDKROOT ENV "PROGRAMFILES(X86)" /usr /opt/rocm/opencl #<--- add this line or the path to where ROCm is installed PATH_SUFFIXES include OpenCL/common/inc "AMD APP/include")

find_library(OpenCL_LIBRARY
    NAMES
        OpenCL
        OpenCL.lib
    NO_DEFAULT_PATH
    PATHS
        ENV "OCL_ROOT"
        ENV "OpenCL_ROOT"
        ENV AMDAPPSDKROOT
        ENV ATISTREAMSDKROOT
        ENV "PROGRAMFILES(X86)"
    /opt/rocm/opencl	           #<--- add this line or the path to where ROCm is installed
    PATH_SUFFIXES
        "AMD APP/lib/x86_64"
        lib/x86_64
        lib/x86_64-linux-gnu
        lib/x64
        OpenCL/common/lib/x64)

ctrl x

cd build cmake -D CMAKE_C_COMPILER=gcc-6 -D CMAKE_CXX_COMPILER=g++-6 .. make install sudo sysctl -w vm.nr_hugepages=128 cd bin ./xmr-stak

pool.minexmr.com:5555 wallet:8BHrts9UzSf6zesQr8JEQ2LhwVb6CUAYxGLQQQEewmRyer5dbibTXEm51UNAeprJGCQFfkPX7Be1TLdZ7vpq4jKvHaDnkLX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment