]> git.ipfire.org Git - thirdparty/gcc.git/commit
[libgomp, nvptx] Allow cuGetErrorString to be NULL
authorvries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Aug 2018 14:26:28 +0000 (14:26 +0000)
committervries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Aug 2018 14:26:28 +0000 (14:26 +0000)
commit3912f4add5906f8b274b040ecad1e1bf77ba1eac
tree5eaefa2fde4ae620a9d6848791130ac97f8d7443
parent143979be19d08df153a16aa3b38ece98dc96a855
[libgomp, nvptx] Allow cuGetErrorString to be NULL

Cuda driver api function cuGetErrorString is available in version 6.0 and
higher.

Currently, when the driver that is used does not contain this function, the
libgomp nvptx plugin will not build (PLUGIN_NVPTX_DYNAMIC == 0) or run
(PLUGIN_NVPTX_DYNAMIC == 1).

This patch fixes this problem by testing for the presence of the function, and
handling absence.

Build on x86_64 with nvptx accelerator and reg-tested libgomp, both with and
without --without-cuda-driver.

2018-08-08  Tom de Vries  <tdevries@suse.de>

* plugin/cuda-lib.def (cuGetErrorString): Use CUDA_ONE_CALL_MAYBE_NULL.
* plugin/plugin-nvptx.c (cuda_error): Handle if cuGetErrorString is not
present.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263407 138bc75d-0d04-0410-961f-82ee72b054a4
libgomp/ChangeLog
libgomp/plugin/cuda-lib.def
libgomp/plugin/plugin-nvptx.c