aboutsummaryrefslogtreecommitdiff
path: root/libgomp/config.h.in
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-01-17 10:44:17 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2017-01-17 10:44:17 +0100
commit2393d337e7c5ff258b1ad167025b9e4d5f518533 (patch)
treeeaf913e6c721a84f592e444c942b624bbb14fe06 /libgomp/config.h.in
parent3c36aa6ba2be894d4092a6ce8129d39ef846c964 (diff)
downloadgcc-2393d337e7c5ff258b1ad167025b9e4d5f518533.zip
gcc-2393d337e7c5ff258b1ad167025b9e4d5f518533.tar.gz
gcc-2393d337e7c5ff258b1ad167025b9e4d5f518533.tar.bz2
configfrag.ac: For --without-cuda-driver don't initialize CUDA_DRIVER_INCLUDE nor CUDA_DRIVER_LIB.
* plugin/configfrag.ac: For --without-cuda-driver don't initialize CUDA_DRIVER_INCLUDE nor CUDA_DRIVER_LIB. If both CUDA_DRIVER_INCLUDE and CUDA_DRIVER_LIB are empty and linking small cuda program fails, define PLUGIN_NVPTX_DYNAMIC to 1 and use plugin/include/cuda as include dir and -ldl instead of -lcuda as library to link ptx plugin against. * plugin/plugin-nvptx.c: Include dlfcn.h if PLUGIN_NVPTX_DYNAMIC. (CUDA_CALLS): Define. (cuda_lib, cuda_lib_inited): New variables. (init_cuda_lib): New function. (CUDA_CALL_PREFIX): Define. (CUDA_CALL_ERET, CUDA_CALL_ASSERT): Use CUDA_CALL_PREFIX. (CUDA_CALL): Use FN instead of (FN). (CUDA_CALL_NOCHECK): Define. (cuda_error, fini_streams_for_device, select_stream_for_async, nvptx_attach_host_thread_to_device, nvptx_open_device, link_ptx, event_gc, nvptx_exec, nvptx_async_test, nvptx_async_test_all, nvptx_wait_all, nvptx_set_clocktick, GOMP_OFFLOAD_unload_image, nvptx_stacks_alloc, nvptx_stacks_free, GOMP_OFFLOAD_run): Use CUDA_CALL_NOCHECK. (nvptx_init): Call init_cuda_lib, if it fails, return false. Use CUDA_CALL_NOCHECK. (nvptx_get_num_devices): Call init_cuda_lib, if it fails, return 0. Use CUDA_CALL_NOCHECK. * plugin/cuda/cuda.h: New file. * config.h.in: Regenerated. * configure: Regenerated. From-SVN: r244522
Diffstat (limited to 'libgomp/config.h.in')
-rw-r--r--libgomp/config.h.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgomp/config.h.in b/libgomp/config.h.in
index 583b9b4..e7bc4d9 100644
--- a/libgomp/config.h.in
+++ b/libgomp/config.h.in
@@ -155,6 +155,10 @@
/* Define to 1 if the NVIDIA plugin is built, 0 if not. */
#undef PLUGIN_NVPTX
+/* Define to 1 if the NVIDIA plugin should dlopen libcuda.so.1, 0 if it should
+ be linked against it. */
+#undef PLUGIN_NVPTX_DYNAMIC
+
/* Define if all infrastructure, needed for plugins, is supported. */
#undef PLUGIN_SUPPORT