While trying to get the latest version built on Gentoo, I'm getting these errors:
quark/cuda_skein512.cu: In function void precalc():
quark/cuda_skein512.cu:2712:50: error: narrowing conversion of 2147483648u from unsigned int to int inside { } [-Wnarrowing]
0x08b2b050, 0x9d7c4c27, 0x0ce2a393, 0x88e6e1ea, 0xa52b4335, 0x67a16f49, 0xd732016f, 0x4eeb2e91,
^
quark/cuda_skein512.cu:2712:50: error: narrowing conversion of 2147483648u from unsigned int to int inside { } [-Wnarrowing]
quark/cuda_skein512.cu:2712:50: error: narrowing conversion of 2684354592u from unsigned int to int inside { } [-Wnarrowing]
quark/cuda_skein512.cu:2712:50: error: narrowing conversion of 4202700544u from unsigned int to int inside { } [-Wnarrowing]
quark/cuda_skein512.cu:2712:50: error: narrowing conversion of 3543279056u from unsigned int to int inside { } [-Wnarrowing]
quark/cuda_skein512.cu:2712:50: error: narrowing conversion of 4142317530u from unsigned int to int inside { } [-Wnarrowing]
quark/cuda_skein512.cu:2712:50: error: narrowing conversion of 3003913545u from unsigned int to int inside { } [-Wnarrowing]
...
This is on a new build I just set up last night, building against CUDA SDK 9.0.176. I already have tpruvot-ccminer (on which sp-ccminer is based) built and running.
I've never written any CUDA code, but it looks like unsigned values are being written into a couple of signed arrays. I'm trying a build now with this patch:
--- quark/cuda_skein512.cu~ 2017-01-01 12:38:31.000000000 -0800
+++ quark/cuda_skein512.cu 2018-01-20 14:05:06.764299663 -0800
@@ -2704,7 +2704,7 @@
// buffer[8] = 0x7000000000000040ull; //t2;
CUDA_SAFE_CALL(cudaMemcpyToSymbol(precalcvalues, buffer, sizeof(buffer), 0, cudaMemcpyHostToDevice));
- int endingTable[] = {
+ unsigned int endingTable[] = {
0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000200,
0x80000000, 0x01400000, 0x00205000, 0x00005088, 0x22000800, 0x22550014, 0x05089742, 0xa0000020,
@@ -2715,7 +2715,7 @@
0x4f0d0f04, 0x2627484e, 0x310128d2, 0xc668b434, 0x420841cc, 0x62d311b8, 0xe59ba771, 0x85a7a484
};
- int constantTable[64] = {
+ unsigned int constantTable[64] = {
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
This appeared to build OK, but then it conked out again:
nvcc -gencode=arch=compute_52,code=\"sm_52,compute_52\" -gencode=arch=compute_50,code=\"sm_50,compute_50\" -I/usr/local/cuda/include -I. --ptxas-options="-v" -gencode=arch=compute_20,code=\"sm_21,compute_20\" --maxrregcount=80 -o scrypt/salsa_kernel.o -c scrypt/salsa_kernel.cu
nvcc fatal : Unsupported gpu architecture 'compute_20'
I'd continue, but I'll need to look into this later as I have somewhere to be in a bit.
