ソースを参照

Remove the "-arch sm_13" option from the NVCCFLAGS.

Users can use NVCCFLAGS when running configure if they need this flag. Plus, this allows the CUDA kernels to work on old NVIDIA cards.
Cyril Roelandt 12 年 前
コミット
ebf4572b34
共有4 個のファイルを変更した9 個の追加2 個の削除を含む
  1. 2 0
      configure.ac
  2. 5 0
      doc/chapters/configuration.texi
  3. 1 1
      examples/Makefile.am
  4. 1 1
      starpufft/Makefile.am

+ 2 - 0
configure.ac

@@ -542,6 +542,8 @@ if test x$enable_cuda = xyes; then
     AC_SUBST(STARPU_CUDA_CPPFLAGS)
 fi
 
+AC_ARG_VAR([NVCCFLAGS], [CUDA compiler flags])
+
 ###############################################################################
 #                                                                             #
 #                                 OpenCL settings                             #

+ 5 - 0
doc/chapters/configuration.texi

@@ -48,6 +48,11 @@ Enable flags for the @code{gcov} coverage tool.
 
 @end table
 
+Additionally, the @command{configure} script recognize many variables, which
+can be listed by typing @code{./configure --help}. For example,
+@code{./configure NVCCFLAGS="-arch sm_13"} adds a flag for the compilation of
+CUDA kernels.
+
 @node Configuring workers
 @subsection Configuring workers
 

+ 1 - 1
examples/Makefile.am

@@ -67,7 +67,7 @@ CLEANFILES += *.gcno *.gcda *.linkinfo
 
 if STARPU_USE_CUDA
 
-NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/  $(HWLOC_CFLAGS) -arch sm_13
+NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/  $(HWLOC_CFLAGS)
 
 .cu.o:
 	$(NVCC) $< -c -o $@ $(NVCCFLAGS)

+ 1 - 1
starpufft/Makefile.am

@@ -57,7 +57,7 @@ am_libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_OBJECTS = cudaf_kernels.o starpuff
 
 if STARPU_HAVE_CUFFTDOUBLECOMPLEX
 cuda_kernels.o: cuda_kernels.cu
-	$(NVCC) $(AM_CPPFLAGS) $< -c -o $@ --compiler-options -fno-strict-aliasing  $(NVCCFLAGS) -I${includedir} -arch sm_13
+	$(NVCC) $(AM_CPPFLAGS) $< -c -o $@ --compiler-options -fno-strict-aliasing  $(NVCCFLAGS) -I${includedir}
 
 libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += cuda_kernels.cu
 am_libstarpufft_@STARPU_EFFECTIVE_VERSION@_la_OBJECTS += cuda_kernels.o