forked from VeriBlock/nodecore-pow-cuda-miner
-
Notifications
You must be signed in to change notification settings - Fork 5
/
BUILD
54 lines (52 loc) · 1.23 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cc_binary(
name = "nodecore-pow-cuda-miner",
srcs = [
"main.cpp",
],
deps = [
":miner",
],
copts = [
"-Iexternal/cuda_local/include",
],
linkopts = [
"-pthread",
],
)
cc_library(
name = "miner",
srcs = [
"kernel.o",
"Miner.cpp",
],
hdrs = [
"picojson.h",
"Constants.h",
"Log.h",
"Miner.h",
"UCPClient.h",
],
copts = [
"-Iexternal/cuda_local/include",
],
deps = [
"@cuda_local//:cuda",
],
)
genrule(
name = "cuda_kernel",
srcs = [
"kernel.cu",
"Constants.h",
"Log.h",
"@cuda_local//:cuda",
],
outs = ["kernel.o"],
cmd = "nvcc -gencode=arch=compute_50,code=\\\"sm_50,compute_50\\\"" +
" -gencode=arch=compute_52,code=\\\"sm_52,compute_52\\\" " +
" -gencode=arch=compute_61,code=\\\"sm_61,compute_61\\\" " +
" -gencode=arch=compute_70,code=\\\"sm_70,compute_70\\\" " +
" -O3 -Xcompiler -Wall --std=c++11 -D_FORCE_INLINES --ptxas-options=\"-v\"" +
" --compiler-options=\"-fPIC\",\"-Iexternal/cuda_local/include\"" +
" --maxrregcount=64 -c $(location :kernel.cu) -o $@"
)