From: Jakub Jelinek Date: Sat, 28 Dec 2019 09:26:03 +0000 (+0100) Subject: re PR bootstrap/93074 (build FAIL with --enable-offload-targets=nvptx-none) X-Git-Tag: upstream/12.2.0~19377 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9dcb75e4053c6859b7c9e602813d852158dceac;p=platform%2Fupstream%2Fgcc.git re PR bootstrap/93074 (build FAIL with --enable-offload-targets=nvptx-none) PR bootstrap/93074 * plugin/cuda/cuda.h (cuDeviceGetName, cuDriverGetVersion): Declare. (cuDeviceTotalMem, cuMemGetInfo): Likewise. Define to *_v2. From-SVN: r279747 --- diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index deaff15..9eb3e2c 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2019-12-28 Jakub Jelinek + + PR bootstrap/93074 + * plugin/cuda/cuda.h (cuDeviceGetName, cuDriverGetVersion): Declare. + (cuDeviceTotalMem, cuMemGetInfo): Likewise. Define to *_v2. + 2019-12-22 Maciej W. Rozycki Frederik Harwath Thomas Schwinge diff --git a/libgomp/plugin/cuda/cuda.h b/libgomp/plugin/cuda/cuda.h index e65f972..40ef21a 100644 --- a/libgomp/plugin/cuda/cuda.h +++ b/libgomp/plugin/cuda/cuda.h @@ -126,8 +126,11 @@ CUresult cuCtxPopCurrent (CUcontext *); CUresult cuCtxPushCurrent (CUcontext); CUresult cuCtxSynchronize (void); CUresult cuDeviceGet (CUdevice *, int); +#define cuDeviceTotalMem cuDeviceTotalMem_v2 +CUresult cuDeviceTotalMem (size_t *, CUdevice); CUresult cuDeviceGetAttribute (int *, CUdevice_attribute, CUdevice); CUresult cuDeviceGetCount (int *); +CUresult cuDeviceGetName (char *, int, CUdevice); CUresult cuEventCreate (CUevent *, unsigned); #define cuEventDestroy cuEventDestroy_v2 CUresult cuEventDestroy (CUevent); @@ -138,6 +141,7 @@ CUresult cuEventSynchronize (CUevent); CUresult cuFuncGetAttribute (int *, CUfunction_attribute, CUfunction); CUresult cuGetErrorString (CUresult, const char **); CUresult cuInit (unsigned); +CUresult cuDriverGetVersion (int *); CUresult cuLaunchKernel (CUfunction, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, CUstream, void **, void **); #define cuLinkAddData cuLinkAddData_v2 @@ -147,6 +151,8 @@ CUresult cuLinkComplete (CUlinkState, void **, size_t *); #define cuLinkCreate cuLinkCreate_v2 CUresult cuLinkCreate (unsigned, CUjit_option *, void **, CUlinkState *); CUresult cuLinkDestroy (CUlinkState); +#define cuMemGetInfo cuMemGetInfo_v2 +CUresult cuMemGetInfo (size_t *, size_t *); #define cuMemAlloc cuMemAlloc_v2 CUresult cuMemAlloc (CUdeviceptr *, size_t); #define cuMemAllocHost cuMemAllocHost_v2