aboutsummaryrefslogtreecommitdiff
path: root/polly/autoconf
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2012-08-03 12:50:07 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2012-08-03 12:50:07 +0000
commit6217e18a7dd50c9f112f8468f7c77fc260f40d89 (patch)
treecbf2767ae63ffb99467b07bc3edf7ec7d461aff0 /polly/autoconf
parent7555b54020b1abcc1e67f66452600e2fa8f93dcd (diff)
downloadllvm-6217e18a7dd50c9f112f8468f7c77fc260f40d89.zip
llvm-6217e18a7dd50c9f112f8468f7c77fc260f40d89.tar.gz
llvm-6217e18a7dd50c9f112f8468f7c77fc260f40d89.tar.bz2
Add preliminary implementation for GPGPU code generation.
Translate the selected parallel loop body into a ptx string and run it with the cuda driver API. We limit this preliminary implementation to target the following special test cases: - Support only 2-dimensional parallel loops with or without only one innermost non-parallel loop. - Support write memory access to only one array in a SCoP. The patch was committed with smaller changes to the build system: There is now a flag to enable gpu code generation explictly. This was required as we need the llvm.codegen() patch applied on the llvm sources, to compile this feature correctly. Also, enabling gpu code generation does not require cuda. This requirement was removed to allow 'make polly-test' runs, even without an installed cuda runtime. Contributed by: Yabin Hu <yabin.hwu@gmail.com> llvm-svn: 161239
Diffstat (limited to 'polly/autoconf')
-rw-r--r--polly/autoconf/configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/polly/autoconf/configure.ac b/polly/autoconf/configure.ac
index 7780055..63df358 100644
--- a/polly/autoconf/configure.ac
+++ b/polly/autoconf/configure.ac
@@ -120,7 +120,20 @@ fi
AC_SUBST(scoplib_rpath)
dnl Check if CUDA lib there
+dnl Disable the build of polly, even if it is checked out into tools/polly.
+AC_ARG_ENABLE(polly_gpu_codegen,
+ AS_HELP_STRING([--enable-polly-gpu-codegen],
+ [Enable GPU code generation in Polly(default is NO)]),,
+ enableval=default)
+case "$enableval" in
+ yes) AC_DEFINE([GPU_CODEGEN],[1], [Define if gpu codegen is enabled]) ;;
+ no) AC_DEFINE([GPU_CODEGEN],[0], [Define if gpu codegen is enabled]) ;;
+ default) AC_DEFINE([GPU_CODEGEN],[0], [Define if gpu codegen is enabled]) ;;
+ *) AC_MSG_ERROR([Invalid setting for --enable-polly-gpu-codegen. Use "yes" or "no"]) ;;
+esac
+
find_lib_and_headers([cuda], [cuda.h], [cuda])
+
AS_IF([test "x$cuda_found" = "xyes"],
[AC_DEFINE([CUDALIB_FOUND],[1],[Define if cudalib found])])