]> rtime.felk.cvut.cz Git - hercules2020/hercules-compiler.git/commitdiff
Decide whether to use GPU-guard in the main Makefile
authorMichal Sojka <michal.sojka@cvut.cz>
Tue, 20 Nov 2018 21:56:25 +0000 (22:56 +0100)
committerMichal Sojka <michal.sojka@cvut.cz>
Tue, 20 Nov 2018 22:36:44 +0000 (23:36 +0100)
Makefile
debian/patches/libpremnotify-makefile.patch

index 4ea5cee91a19597a8a68e6717f9baed215aa5c31..a17a93d73b314a45d72057d06a3794f6d2941745 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -99,7 +99,7 @@ passes: build_passes/build.ninja
        ninja -C build_passes
 
 libpremnotify:
-       $(MAKE) -C HerculesCompiler/libpremnotify
+       $(MAKE) -C HerculesCompiler/libpremnotify NVCC_FLAGS=-UUSE_GPUGUARD
 
 install: all
        DESTDIR=$(DESTDIR) ninja -C build install
index 4afbee289f3fdea0067fe036c95ccfbbbae87075..b01505ab19f5abc7e2f37e12a426e06a06678549 100644 (file)
@@ -1,7 +1,5 @@
-Index: hercules-compiler/HerculesCompiler/libpremnotify/Makefile
-===================================================================
---- hercules-compiler.orig/HerculesCompiler/libpremnotify/Makefile
-+++ hercules-compiler/HerculesCompiler/libpremnotify/Makefile
+--- a/HerculesCompiler/libpremnotify/Makefile
++++ b/HerculesCompiler/libpremnotify/Makefile
 @@ -1,12 +1,28 @@
  PREFIX=/usr/local
 +NVCC=$(or $(shell which nvcc),$(wildcard /usr/local/cuda/bin/nvcc))
@@ -22,7 +20,7 @@ Index: hercules-compiler/HerculesCompiler/libpremnotify/Makefile
 +      ranlib libpremnotify-gpu.a
 +
 +libpremnotify-gpu.o:
-+      $(NVCC) -ccbin $(CC) -arch=compute_62 -code=sm_62 -dc libpremnotify-gpu.cu -Xptxas -v -Xnvlink -v -Xptxas -maxrregcount=16,-func-maxrregcount=16 -o libpremnotify-gpu.o
++      $(NVCC) -ccbin $(CC) $(NVCC_FLAGS) -arch=compute_62 -code=sm_62 -dc libpremnotify-gpu.cu -Xptxas -v -Xnvlink -v -Xptxas -maxrregcount=16,-func-maxrregcount=16 -o libpremnotify-gpu.o
 +
  install: all
        install -D -m 644 libpremnotify-cpu.a $(DESTDIR)$(PREFIX)/lib/hercules/libpremnotify-cpu.a