nicehash / nheqminer

Equihash miner for NiceHash
https://www.nicehash.com
MIT License
768 stars 583 forks source link

Is it possible to compile CUDA_djezo miner with CUDA 7.5? #247

Open George-Gate opened 7 years ago

George-Gate commented 7 years ago

My server only have CUDA 7.5 runtime library, so I want to know if I can compile the new cuda miner with CUDA 7.5. I have tried it but the compiler gives errors:

[ 4%] Building NVCC (Device) object cuda_djezo/CMakeFiles/cuda_djezo.dir/cuda_djezo_generated_equi_miner.cu.o nheqminer-0.5c/cuda_djezo/equi_miner.cu(311): error: identifier "ldca" is undefined detected during: instantiation of "void digit_first<RB,SM,PACKER>(equi<RB, SM> , u32) [with RB=9U, SM=1248U, PACKER=packer_cantor]" (2073): here instantiation of "void eq_cuda_context<RB, SM, SSM, THREADS, PACKER>::solve(const char , unsigned int, const char *, unsigned int, std::function<nv_bool ()>, std::function<void (const std::vector<uint32_t, std::allocator> &, size_t, const unsigned char *)>, std::function<void ()>) [with RB=9U, SM=1248U, SSM=12U, THREADS=640U, PACKER=packer_cantor]" (2150): here

nheqminer-0.5c/cuda_djezo/equi_miner.cu(311): error: identifier "ldca" is undefined detected during: instantiation of "void digit_first<RB,SM,PACKER>(equi<RB, SM> , u32) [with RB=8U, SM=640U, PACKER=packer_default]" (2073): here instantiation of "void eq_cuda_context<RB, SM, SSM, THREADS, PACKER>::solve(const char , unsigned int, const char *, unsigned int, std::function<nv_bool ()>, std::function<void (const std::vector<uint32_t, std::allocator> &, size_t, const unsigned char *)>, std::function<void ()>) [with RB=8U, SM=640U, SSM=12U, THREADS=512U, PACKER=packer_default]" (2154): here

2 errors detected in the compilation of "/tmp/tmpxft_0000a599_00000000-7_equi_miner.cpp1.ii". CMake Error at cuda_djezo_generated_equi_miner.cu.o.cmake:282 (message): Error generating file heqminer-.5c/build/cuda_djezo/CMakeFiles/cuda_djezo.dir//./cuda_djezo_generated_equi_miner.cu.o

make[2]: [cuda_djezo/CMakeFiles/cuda_djezo.dir/cuda_djezo_generated_equi_miner.cu.o] Error 1 make[1]: [cuda_djezo/CMakeFiles/cuda_djezo.dir/all] Error 2 make: *** [all] Error 2

George-Gate commented 7 years ago

I also try the CUDA_Tromp miner with CUDA7.5 on my server, I'm so amazing that only 17 Sols/s with Tesla K80 ...... Is it normal?

donggu-kang commented 7 years ago

Me too.

I use 1080 but only 26sols / s is measured.

I think I'm going crazy.

So I went through the CUDA version in README.md and now I get a cuda error.

Never change the CUDA version.

be careful.

If you are curious, check out the issue I just uploaded.

philipperemy commented 7 years ago

Could not make it work. 26 Sol/s seems like only the CPU is working

philipperemy commented 7 years ago
[12:05:05][0x00007f76aea8b700] miner#0 | Starting thread #0 (CPU-XENONCAT-AVX2)
[12:05:05][0x00007f76ada89700] miner#2 | Starting thread #2 (CPU-XENONCAT-AVX2)
[12:05:05][0x00007f76ad288700] miner#3 | Starting thread #3 (CPU-XENONCAT-AVX2)
[12:05:05][0x00007f76ae28a700] miner#1 | Starting thread #1 (CPU-XENONCAT-AVX2)
[12:05:05][0x00007f76aca87700] miner#4 | Starting thread #4 (CPU-XENONCAT-AVX2)
[12:05:05][0x00007f76af28c700] stratum | Connecting to stratum server equihash.jp.nicehash.com:3357
[12:05:05][0x00007f7697fff700] miner#5 | Starting thread #5 (CPU-XENONCAT-AVX2)
[12:05:05][0x00007f76977fe700] miner#6 | Starting thread #6 (cuda_djezo_STUB)

I'm running on the CPU

jopasserat commented 6 years ago

It's actually possible to compile and run djezo with CUDA 7.5 (managed that with 7.0).

The error @George-Gate is getting is because a new intrinsic load appeared in CUDA 8.0: __ldca. As suggested on the developer forum

Another developer suggested an implementation of cache load that looks roughly equivalent to the missing __ldca.

From that, I've added the following function to djezo's source code

__device__ int loadThroughL1Cache(int* p)
{
    int out;
    asm("ld.global.ca.s32 %0, [%1];" : "=r"(out) : "l"(p));
    return out;
}

Compiles fine but runs slow.. getting around 15-20 sol/s on a GTX 780.