1 |
commit: a788dbf0de374240b116598b7a93881509258e24 |
2 |
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 7 12:55:50 2020 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 7 12:55:58 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=a788dbf0 |
7 |
|
8 |
sci-libs/pytorch: refresh cuda nccl patch for 1.6.0. |
9 |
|
10 |
Package-Manager: Portage-2.3.88, Repoman-2.3.18 |
11 |
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> |
12 |
|
13 |
.../files/pytorch-1.6.0-nccl-nvccflags.patch | 27 ++++++++++++++++++++++ |
14 |
sci-libs/pytorch/pytorch-1.6.0.ebuild | 2 +- |
15 |
2 files changed, 28 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/sci-libs/pytorch/files/pytorch-1.6.0-nccl-nvccflags.patch b/sci-libs/pytorch/files/pytorch-1.6.0-nccl-nvccflags.patch |
18 |
new file mode 100644 |
19 |
index 000000000..052474ee4 |
20 |
--- /dev/null |
21 |
+++ b/sci-libs/pytorch/files/pytorch-1.6.0-nccl-nvccflags.patch |
22 |
@@ -0,0 +1,27 @@ |
23 |
+diff -uprN nccl-5949d96f36d050e59d05872f8bbffd2549318e95/makefiles/common.mk nccl-patched/makefiles/common.mk |
24 |
+--- nccl-5949d96f36d050e59d05872f8bbffd2549318e95/makefiles/common.mk 2020-06-09 00:31:44.000000000 +0800 |
25 |
++++ nccl-patched/makefiles/common.mk 2020-08-06 21:25:57.784279738 +0800 |
26 |
+@@ -54,7 +54,7 @@ CXXFLAGS := -DCUDA_MAJOR=$(CUDA_MAJOR) |
27 |
+ # Maxrregcount needs to be set accordingly to NCCL_MAX_NTHREADS (otherwise it will cause kernel launch errors) |
28 |
+ # 512 : 120, 640 : 96, 768 : 80, 1024 : 60 |
29 |
+ # We would not have to set this if we used __launch_bounds__, but this only works on kernels, not on functions. |
30 |
+-NVCUFLAGS := -ccbin $(CXX) $(NVCC_GENCODE) -std=c++11 -Xptxas -maxrregcount=96 -Xfatbin -compress-all |
31 |
++NVCUFLAGS := $(NVCCFLAGS) $(NVCC_GENCODE) -std=c++11 -Xptxas -maxrregcount=96 -Xfatbin -compress-all |
32 |
+ # Use addprefix so that we can specify more than one path |
33 |
+ NVLDFLAGS := -L${CUDA_LIB} -lcudart -lrt |
34 |
+ |
35 |
+@@ -68,14 +68,6 @@ NVLDFLAGS += ${GCOV_FLAGS:%=-Xcompiler |
36 |
+ # $(warning GCOV_FLAGS=${GCOV_FLAGS}) |
37 |
+ ########## GCOV ########## |
38 |
+ |
39 |
+-ifeq ($(DEBUG), 0) |
40 |
+-NVCUFLAGS += -O3 |
41 |
+-CXXFLAGS += -O3 -g |
42 |
+-else |
43 |
+-NVCUFLAGS += -O0 -G -g |
44 |
+-CXXFLAGS += -O0 -g -ggdb3 |
45 |
+-endif |
46 |
+- |
47 |
+ ifneq ($(VERBOSE), 0) |
48 |
+ NVCUFLAGS += -Xptxas -v -Xcompiler -Wall,-Wextra,-Wno-unused-parameter |
49 |
+ CXXFLAGS += -Wall -Wextra |
50 |
|
51 |
diff --git a/sci-libs/pytorch/pytorch-1.6.0.ebuild b/sci-libs/pytorch/pytorch-1.6.0.ebuild |
52 |
index c59b248e2..1394bdbe3 100644 |
53 |
--- a/sci-libs/pytorch/pytorch-1.6.0.ebuild |
54 |
+++ b/sci-libs/pytorch/pytorch-1.6.0.ebuild |
55 |
@@ -147,7 +147,7 @@ src_prepare() { |
56 |
|
57 |
if use cuda; then |
58 |
cd ../nccl || die |
59 |
- eapply "${FILESDIR}"/${PN}-1.4.0-nccl-nvccflags.patch |
60 |
+ eapply "${FILESDIR}"/${PN}-1.6.0-nccl-nvccflags.patch |
61 |
ln -s . nccl || die |
62 |
|
63 |
cuda_src_prepare |