diff options
author | Tom de Vries <tdevries@suse.de> | 2018-08-08 14:26:10 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2018-08-08 14:26:10 +0000 |
commit | 94767dacea8098464a6b23c74bb5768449c6443c (patch) | |
tree | 08001ab3d4eb5b438c67754e0a818efcbe871115 /libgomp | |
parent | dc878fea7ad912f528df2e5bb6be50f49fa2f393 (diff) | |
download | gcc-94767dacea8098464a6b23c74bb5768449c6443c.tar.gz |
[libgomp, nvptx] Note that cuGetErrorString is in CUDA_VERSION >= 6000
Cuda driver api function cuGetErrorString is available in version 6.0 and
higher.
This patch:
- removes a comment saying the declaration is not available in cuda.h 6.0
- fixes the presence test to use CUDA_VERSION < 6000
- moves the declaration to toplevel
Build on x86_64 with nvptx accelerator and reg-tested libgomp.
2018-08-08 Tom de Vries <tdevries@suse.de>
* plugin/plugin-nvptx.c (cuda_error): Move declaration of cuGetErrorString ...
(cuGetErrorString): ... here. Guard with CUDA_VERSION < 6000.
From-SVN: r263405
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/plugin/plugin-nvptx.c | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index e3b92a707df..f674b5eebc4 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2018-08-08 Tom de Vries <tdevries@suse.de> + + * plugin/plugin-nvptx.c (cuda_error): Move declaration of cuGetErrorString ... + (cuGetErrorString): ... here. Guard with CUDA_VERSION < 6000. + 2018-08-07 Tom de Vries <tdevries@suse.de> * plugin/plugin-nvptx.c (DO_PRAGMA): Define. diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index 825470adce3..e2ea542049b 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -49,6 +49,10 @@ #include <assert.h> #include <errno.h> +#if CUDA_VERSION < 6000 +extern CUresult cuGetErrorString (CUresult, const char **); +#endif + #define DO_PRAGMA(x) _Pragma (#x) #if PLUGIN_NVPTX_DYNAMIC @@ -156,11 +160,6 @@ init_cuda_lib (void) static const char * cuda_error (CUresult r) { -#if CUDA_VERSION < 7000 - /* Specified in documentation and present in library from at least - 5.5. Not declared in header file prior to 7.0. */ - extern CUresult cuGetErrorString (CUresult, const char **); -#endif const char *desc; r = CUDA_CALL_NOCHECK (cuGetErrorString, r, &desc); |