|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(__CUDA_DEVICE_RUNTIME_API_H__)
|
|
|
#define __CUDA_DEVICE_RUNTIME_API_H__
|
|
|
|
|
|
#if defined(__CUDACC__) && !defined(__CUDACC_RTC__)
|
|
|
#include <stdlib.h>
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(CUDA_FORCE_CDP1_IF_SUPPORTED) && !defined(__CUDADEVRT_INTERNAL__) && !defined(_NVHPC_CUDA) && !(defined(_WIN32) && !defined(_WIN64))
|
|
|
#define __CUDA_INTERNAL_USE_CDP2
|
|
|
#endif
|
|
|
|
|
|
#if !defined(__CUDACC_RTC__)
|
|
|
|
|
|
#if !defined(__CUDACC_INTERNAL_NO_STUBS__) && !defined(__CUDACC_RDC__) && !defined(__CUDACC_EWP__) && defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 350) && !defined(__CUDADEVRT_INTERNAL__)
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
extern "C" {
|
|
|
#endif
|
|
|
|
|
|
struct cudaFuncAttributes;
|
|
|
|
|
|
|
|
|
#ifndef __CUDA_INTERNAL_USE_CDP2
|
|
|
inline __device__ cudaError_t CUDARTAPI cudaMalloc(void **p, size_t s)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
|
|
|
inline __device__ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *p, const void *c)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
|
|
|
inline __device__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
|
|
|
inline __device__ cudaError_t CUDARTAPI cudaGetDevice(int *device)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
|
|
|
inline __device__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
|
|
|
inline __device__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize, unsigned int flags)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
#else
|
|
|
inline __device__ cudaError_t CUDARTAPI __cudaCDP2Malloc(void **p, size_t s)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
|
|
|
inline __device__ cudaError_t CUDARTAPI __cudaCDP2FuncGetAttributes(struct cudaFuncAttributes *p, const void *c)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
|
|
|
inline __device__ cudaError_t CUDARTAPI __cudaCDP2DeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
|
|
|
inline __device__ cudaError_t CUDARTAPI __cudaCDP2GetDevice(int *device)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
|
|
|
inline __device__ cudaError_t CUDARTAPI __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
|
|
|
inline __device__ cudaError_t CUDARTAPI __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize, unsigned int flags)
|
|
|
{
|
|
|
return cudaErrorUnknown;
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#if defined(__DOXYGEN_ONLY__) || defined(CUDA_ENABLE_DEPRECATED)
|
|
|
# define __DEPRECATED__(msg)
|
|
|
#elif defined(_WIN32)
|
|
|
# define __DEPRECATED__(msg) __declspec(deprecated(msg))
|
|
|
#elif (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5 && !defined(__clang__))))
|
|
|
# define __DEPRECATED__(msg) __attribute__((deprecated))
|
|
|
#else
|
|
|
# define __DEPRECATED__(msg) __attribute__((deprecated(msg)))
|
|
|
#endif
|
|
|
|
|
|
#if defined(__CUDA_ARCH__) && !defined(__CDPRT_SUPPRESS_SYNC_DEPRECATION_WARNING)
|
|
|
# define __CDPRT_DEPRECATED(func_name) __DEPRECATED__("Use of "#func_name" from device code is deprecated. Moreover, such use will cause this module to fail to load on sm_90+ devices. If calls to "#func_name" from device code cannot be removed for older devices at this time, you may guard them with __CUDA_ARCH__ macros to remove them only for sm_90+ devices, making sure to generate code for compute_90 for the macros to take effect. Note that this mitigation will no longer work when support for "#func_name" from device code is eventually dropped for all devices. Disable this warning with -D__CDPRT_SUPPRESS_SYNC_DEPRECATION_WARNING.")
|
|
|
#else
|
|
|
# define __CDPRT_DEPRECATED(func_name)
|
|
|
#endif
|
|
|
|
|
|
#if defined(__cplusplus) && defined(__CUDACC__)
|
|
|
#if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 350)
|
|
|
|
|
|
#include "driver_types.h"
|
|
|
#include "crt/host_defines.h"
|
|
|
|
|
|
#define cudaStreamGraphTailLaunch (cudaStream_t)0x0100000000000000
|
|
|
#define cudaStreamGraphFireAndForget (cudaStream_t)0x0200000000000000
|
|
|
#define cudaStreamGraphFireAndForgetAsSibling (cudaStream_t)0x0300000000000000
|
|
|
|
|
|
#ifdef __CUDA_INTERNAL_USE_CDP2
|
|
|
#define cudaStreamTailLaunch ((cudaStream_t)0x3)
|
|
|
#define cudaStreamFireAndForget ((cudaStream_t)0x4)
|
|
|
#endif
|
|
|
|
|
|
extern "C"
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaDeviceSynchronizeDeprecationAvoidance(void);
|
|
|
|
|
|
#ifndef __CUDA_INTERNAL_USE_CDP2
|
|
|
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetLimit(size_t *pValue, enum cudaLimit limit);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetCacheConfig(enum cudaFuncCache *pCacheConfig);
|
|
|
extern __DEPRECATED__("cudaDeviceGetSharedMemConfig deprecated") __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetSharedMemConfig(enum cudaSharedMemConfig *pConfig);
|
|
|
#if (__CUDA_ARCH__ < 900) && (defined(CUDA_FORCE_CDP1_IF_SUPPORTED) || (defined(_WIN32) && !defined(_WIN64)))
|
|
|
|
|
|
extern __device__ __cudart_builtin__ __CDPRT_DEPRECATED(cudaDeviceSynchronize) cudaError_t CUDARTAPI cudaDeviceSynchronize(void);
|
|
|
#endif
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetLastError(void);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaPeekAtLastError(void);
|
|
|
extern __device__ __cudart_builtin__ const char* CUDARTAPI cudaGetErrorString(cudaError_t error);
|
|
|
extern __device__ __cudart_builtin__ const char* CUDARTAPI cudaGetErrorName(cudaError_t error);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDeviceCount(int *count);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDevice(int *device);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamCreateWithFlags(cudaStream_t *pStream, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamDestroy(cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamWaitEvent_ptsz(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventCreateWithFlags(cudaEvent_t *event, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecord(cudaEvent_t event, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecord_ptsz(cudaEvent_t event, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecordWithFlags_ptsz(cudaEvent_t event, cudaStream_t stream, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventDestroy(cudaEvent_t event);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFree(void *devPtr);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMalloc(void **devPtr, size_t size);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpyAsync(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpyAsync_ptsz(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy2DAsync_ptsz(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy3DAsync(const struct cudaMemcpy3DParms *p, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy3DAsync_ptsz(const struct cudaMemcpy3DParms *p, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemsetAsync(void *devPtr, int value, size_t count, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemsetAsync_ptsz(void *devPtr, int value, size_t count, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset2DAsync_ptsz(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset3DAsync(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset3DAsync_ptsz(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaRuntimeGetVersion(int *runtimeVersion);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize, unsigned int flags);
|
|
|
#endif
|
|
|
|
|
|
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2DeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2DeviceGetLimit(size_t *pValue, enum cudaLimit limit);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2DeviceGetCacheConfig(enum cudaFuncCache *pCacheConfig);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2DeviceGetSharedMemConfig(enum cudaSharedMemConfig *pConfig);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2GetLastError(void);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2PeekAtLastError(void);
|
|
|
extern __device__ __cudart_builtin__ const char* CUDARTAPI __cudaCDP2GetErrorString(cudaError_t error);
|
|
|
extern __device__ __cudart_builtin__ const char* CUDARTAPI __cudaCDP2GetErrorName(cudaError_t error);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2GetDeviceCount(int *count);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2GetDevice(int *device);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2StreamCreateWithFlags(cudaStream_t *pStream, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2StreamDestroy(cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2StreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2StreamWaitEvent_ptsz(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventCreateWithFlags(cudaEvent_t *event, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventRecord(cudaEvent_t event, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventRecord_ptsz(cudaEvent_t event, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventRecordWithFlags_ptsz(cudaEvent_t event, cudaStream_t stream, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2EventDestroy(cudaEvent_t event);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2FuncGetAttributes(struct cudaFuncAttributes *attr, const void *func);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Free(void *devPtr);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Malloc(void **devPtr, size_t size);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2MemcpyAsync(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2MemcpyAsync_ptsz(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memcpy2DAsync_ptsz(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memcpy3DAsync(const struct cudaMemcpy3DParms *p, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memcpy3DAsync_ptsz(const struct cudaMemcpy3DParms *p, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2MemsetAsync(void *devPtr, int value, size_t count, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2MemsetAsync_ptsz(void *devPtr, int value, size_t count, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memset2DAsync_ptsz(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memset3DAsync(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2Memset3DAsync_ptsz(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2RuntimeGetVersion(int *runtimeVersion);
|
|
|
extern __device__ __cudart_builtin__ void * CUDARTAPI __cudaCDP2GetParameterBuffer(size_t alignment, size_t size);
|
|
|
extern __device__ __cudart_builtin__ void * CUDARTAPI __cudaCDP2GetParameterBufferV2(void *func, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2LaunchDevice_ptsz(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2LaunchDeviceV2_ptsz(void *parameterBuffer, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2LaunchDevice(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2LaunchDeviceV2(void *parameterBuffer, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize, unsigned int flags);
|
|
|
|
|
|
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream);
|
|
|
#if defined(CUDA_API_PER_THREAD_DEFAULT_STREAM)
|
|
|
static inline __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGraphLaunch_ptsz(cudaGraphExec_t graphExec, cudaStream_t stream)
|
|
|
{
|
|
|
if (stream == 0) {
|
|
|
stream = cudaStreamPerThread;
|
|
|
}
|
|
|
return cudaGraphLaunch(graphExec, stream);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static inline __device__ __cudart_builtin__ cudaGraphExec_t CUDARTAPI cudaGetCurrentGraphExec(void)
|
|
|
{
|
|
|
unsigned long long current_graph_exec;
|
|
|
asm ("mov.u64 %0, %%current_graph_exec;" : "=l"(current_graph_exec));
|
|
|
return (cudaGraphExec_t)current_graph_exec;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGraphKernelNodeSetParam(cudaGraphDeviceNode_t node, size_t offset, const void *value , size_t size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGraphKernelNodeSetEnabled(cudaGraphDeviceNode_t node, bool enable);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGraphKernelNodeSetGridDim(cudaGraphDeviceNode_t node, dim3 gridDim);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGraphKernelNodeUpdatesApply(const cudaGraphKernelNodeUpdate *updates, size_t updateCount);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static inline __device__ __cudart_builtin__ void CUDARTAPI cudaTriggerProgrammaticLaunchCompletion(void)
|
|
|
{
|
|
|
asm volatile("griddepcontrol.launch_dependents;":::);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static inline __device__ __cudart_builtin__ void CUDARTAPI cudaGridDependencySynchronize(void)
|
|
|
{
|
|
|
asm volatile("griddepcontrol.wait;":::"memory");
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern __device__ __cudart_builtin__ void CUDARTAPI cudaGraphSetConditional(cudaGraphConditionalHandle handle, unsigned int value);
|
|
|
|
|
|
|
|
|
extern __device__ __cudart_builtin__ unsigned long long CUDARTAPI cudaCGGetIntrinsicHandle(enum cudaCGScope scope);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaCGSynchronize(unsigned long long handle, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaCGSynchronizeGrid(unsigned long long handle, unsigned int flags);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaCGGetSize(unsigned int *numThreads, unsigned int *numGrids, unsigned long long handle);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaCGGetRank(unsigned int *threadRank, unsigned int *gridRank, unsigned long long handle);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __CUDA_ARCH__
|
|
|
|
|
|
#ifdef __CUDA_INTERNAL_USE_CDP2
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device)
|
|
|
{
|
|
|
return __cudaCDP2DeviceGetAttribute(value, attr, device);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetLimit(size_t *pValue, enum cudaLimit limit)
|
|
|
{
|
|
|
return __cudaCDP2DeviceGetLimit(pValue, limit);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetCacheConfig(enum cudaFuncCache *pCacheConfig)
|
|
|
{
|
|
|
return __cudaCDP2DeviceGetCacheConfig(pCacheConfig);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetSharedMemConfig(enum cudaSharedMemConfig *pConfig)
|
|
|
{
|
|
|
return __cudaCDP2DeviceGetSharedMemConfig(pConfig);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetLastError(void)
|
|
|
{
|
|
|
return __cudaCDP2GetLastError();
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaPeekAtLastError(void)
|
|
|
{
|
|
|
return __cudaCDP2PeekAtLastError();
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ const char* CUDARTAPI cudaGetErrorString(cudaError_t error)
|
|
|
{
|
|
|
return __cudaCDP2GetErrorString(error);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ const char* CUDARTAPI cudaGetErrorName(cudaError_t error)
|
|
|
{
|
|
|
return __cudaCDP2GetErrorName(error);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDeviceCount(int *count)
|
|
|
{
|
|
|
return __cudaCDP2GetDeviceCount(count);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDevice(int *device)
|
|
|
{
|
|
|
return __cudaCDP2GetDevice(device);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamCreateWithFlags(cudaStream_t *pStream, unsigned int flags)
|
|
|
{
|
|
|
return __cudaCDP2StreamCreateWithFlags(pStream, flags);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamDestroy(cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2StreamDestroy(stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags)
|
|
|
{
|
|
|
return __cudaCDP2StreamWaitEvent(stream, event, flags);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamWaitEvent_ptsz(cudaStream_t stream, cudaEvent_t event, unsigned int flags)
|
|
|
{
|
|
|
return __cudaCDP2StreamWaitEvent_ptsz(stream, event, flags);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventCreateWithFlags(cudaEvent_t *event, unsigned int flags)
|
|
|
{
|
|
|
return __cudaCDP2EventCreateWithFlags(event, flags);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecord(cudaEvent_t event, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2EventRecord(event, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecord_ptsz(cudaEvent_t event, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2EventRecord_ptsz(event, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags)
|
|
|
{
|
|
|
return __cudaCDP2EventRecordWithFlags(event, stream, flags);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecordWithFlags_ptsz(cudaEvent_t event, cudaStream_t stream, unsigned int flags)
|
|
|
{
|
|
|
return __cudaCDP2EventRecordWithFlags_ptsz(event, stream, flags);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventDestroy(cudaEvent_t event)
|
|
|
{
|
|
|
return __cudaCDP2EventDestroy(event);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func)
|
|
|
{
|
|
|
return __cudaCDP2FuncGetAttributes(attr, func);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFree(void *devPtr)
|
|
|
{
|
|
|
return __cudaCDP2Free(devPtr);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMalloc(void **devPtr, size_t size)
|
|
|
{
|
|
|
return __cudaCDP2Malloc(devPtr, size);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpyAsync(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2MemcpyAsync(dst, src, count, kind, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpyAsync_ptsz(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2MemcpyAsync_ptsz(dst, src, count, kind, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2Memcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy2DAsync_ptsz(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2Memcpy2DAsync_ptsz(dst, dpitch, src, spitch, width, height, kind, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy3DAsync(const struct cudaMemcpy3DParms *p, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2Memcpy3DAsync(p, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy3DAsync_ptsz(const struct cudaMemcpy3DParms *p, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2Memcpy3DAsync_ptsz(p, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemsetAsync(void *devPtr, int value, size_t count, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2MemsetAsync(devPtr, value, count, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemsetAsync_ptsz(void *devPtr, int value, size_t count, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2MemsetAsync_ptsz(devPtr, value, count, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2Memset2DAsync(devPtr, pitch, value, width, height, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset2DAsync_ptsz(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2Memset2DAsync_ptsz(devPtr, pitch, value, width, height, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset3DAsync(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2Memset3DAsync(pitchedDevPtr, value, extent, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset3DAsync_ptsz(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2Memset3DAsync_ptsz(pitchedDevPtr, value, extent, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaRuntimeGetVersion(int *runtimeVersion)
|
|
|
{
|
|
|
return __cudaCDP2RuntimeGetVersion(runtimeVersion);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize)
|
|
|
{
|
|
|
return __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSmemSize);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSmemSize, unsigned int flags)
|
|
|
{
|
|
|
return __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSmemSize, flags);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __CUDA_INTERNAL_USE_CDP2
|
|
|
static __inline__ __device__ __cudart_builtin__ void * CUDARTAPI cudaGetParameterBuffer(size_t alignment, size_t size)
|
|
|
{
|
|
|
return __cudaCDP2GetParameterBuffer(alignment, size);
|
|
|
}
|
|
|
#else
|
|
|
extern __device__ __cudart_builtin__ void * CUDARTAPI cudaGetParameterBuffer(size_t alignment, size_t size);
|
|
|
#endif
|
|
|
|
|
|
|
|
|
#ifdef __CUDA_INTERNAL_USE_CDP2
|
|
|
static __inline__ __device__ __cudart_builtin__ void * CUDARTAPI cudaGetParameterBufferV2(void *func, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize)
|
|
|
{
|
|
|
return __cudaCDP2GetParameterBufferV2(func, gridDimension, blockDimension, sharedMemSize);
|
|
|
}
|
|
|
#else
|
|
|
extern __device__ __cudart_builtin__ void * CUDARTAPI cudaGetParameterBufferV2(void *func, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize);
|
|
|
#endif
|
|
|
|
|
|
|
|
|
#ifdef __CUDA_INTERNAL_USE_CDP2
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDevice_ptsz(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2LaunchDevice_ptsz(func, parameterBuffer, gridDimension, blockDimension, sharedMemSize, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDeviceV2_ptsz(void *parameterBuffer, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2LaunchDeviceV2_ptsz(parameterBuffer, stream);
|
|
|
}
|
|
|
#else
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDevice_ptsz(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDeviceV2_ptsz(void *parameterBuffer, cudaStream_t stream);
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(CUDA_API_PER_THREAD_DEFAULT_STREAM) && defined(__CUDA_ARCH__)
|
|
|
|
|
|
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI
|
|
|
cudaLaunchDevice(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream)
|
|
|
{
|
|
|
#ifdef __CUDA_INTERNAL_USE_CDP2
|
|
|
return __cudaCDP2LaunchDevice_ptsz(func, parameterBuffer, gridDimension, blockDimension, sharedMemSize, stream);
|
|
|
#else
|
|
|
return cudaLaunchDevice_ptsz(func, parameterBuffer, gridDimension, blockDimension, sharedMemSize, stream);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI
|
|
|
cudaLaunchDeviceV2(void *parameterBuffer, cudaStream_t stream)
|
|
|
{
|
|
|
#ifdef __CUDA_INTERNAL_USE_CDP2
|
|
|
return __cudaCDP2LaunchDeviceV2_ptsz(parameterBuffer, stream);
|
|
|
#else
|
|
|
return cudaLaunchDeviceV2_ptsz(parameterBuffer, stream);
|
|
|
#endif
|
|
|
}
|
|
|
#else
|
|
|
#ifdef __CUDA_INTERNAL_USE_CDP2
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDevice(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2LaunchDevice(func, parameterBuffer, gridDimension, blockDimension, sharedMemSize, stream);
|
|
|
}
|
|
|
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDeviceV2(void *parameterBuffer, cudaStream_t stream)
|
|
|
{
|
|
|
return __cudaCDP2LaunchDeviceV2(parameterBuffer, stream);
|
|
|
}
|
|
|
#else
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDevice(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream);
|
|
|
extern __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaLaunchDeviceV2(void *parameterBuffer, cudaStream_t stream);
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#define __cudaCDP2DeviceGetAttribute
|
|
|
#define __cudaCDP2DeviceGetLimit
|
|
|
#define __cudaCDP2DeviceGetCacheConfig
|
|
|
#define __cudaCDP2DeviceGetSharedMemConfig
|
|
|
#define __cudaCDP2GetLastError
|
|
|
#define __cudaCDP2PeekAtLastError
|
|
|
#define __cudaCDP2GetErrorString
|
|
|
#define __cudaCDP2GetErrorName
|
|
|
#define __cudaCDP2GetDeviceCount
|
|
|
#define __cudaCDP2GetDevice
|
|
|
#define __cudaCDP2StreamCreateWithFlags
|
|
|
#define __cudaCDP2StreamDestroy
|
|
|
#define __cudaCDP2StreamWaitEvent
|
|
|
#define __cudaCDP2StreamWaitEvent_ptsz
|
|
|
#define __cudaCDP2EventCreateWithFlags
|
|
|
#define __cudaCDP2EventRecord
|
|
|
#define __cudaCDP2EventRecord_ptsz
|
|
|
#define __cudaCDP2EventRecordWithFlags
|
|
|
#define __cudaCDP2EventRecordWithFlags_ptsz
|
|
|
#define __cudaCDP2EventDestroy
|
|
|
#define __cudaCDP2FuncGetAttributes
|
|
|
#define __cudaCDP2Free
|
|
|
#define __cudaCDP2Malloc
|
|
|
#define __cudaCDP2MemcpyAsync
|
|
|
#define __cudaCDP2MemcpyAsync_ptsz
|
|
|
#define __cudaCDP2Memcpy2DAsync
|
|
|
#define __cudaCDP2Memcpy2DAsync_ptsz
|
|
|
#define __cudaCDP2Memcpy3DAsync
|
|
|
#define __cudaCDP2Memcpy3DAsync_ptsz
|
|
|
#define __cudaCDP2MemsetAsync
|
|
|
#define __cudaCDP2MemsetAsync_ptsz
|
|
|
#define __cudaCDP2Memset2DAsync
|
|
|
#define __cudaCDP2Memset2DAsync_ptsz
|
|
|
#define __cudaCDP2Memset3DAsync
|
|
|
#define __cudaCDP2Memset3DAsync_ptsz
|
|
|
#define __cudaCDP2RuntimeGetVersion
|
|
|
#define __cudaCDP2GetParameterBuffer
|
|
|
#define __cudaCDP2GetParameterBufferV2
|
|
|
#define __cudaCDP2LaunchDevice_ptsz
|
|
|
#define __cudaCDP2LaunchDeviceV2_ptsz
|
|
|
#define __cudaCDP2LaunchDevice
|
|
|
#define __cudaCDP2LaunchDeviceV2
|
|
|
#define __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessor
|
|
|
#define __cudaCDP2OccupancyMaxActiveBlocksPerMultiprocessorWithFlags
|
|
|
|
|
|
}
|
|
|
|
|
|
template <typename T> static __inline__ __device__ __cudart_builtin__ cudaError_t cudaMalloc(T **devPtr, size_t size);
|
|
|
template <typename T> static __inline__ __device__ __cudart_builtin__ cudaError_t cudaFuncGetAttributes(struct cudaFuncAttributes *attr, T *entry);
|
|
|
template <typename T> static __inline__ __device__ __cudart_builtin__ cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, T func, int blockSize, size_t dynamicSmemSize);
|
|
|
template <typename T> static __inline__ __device__ __cudart_builtin__ cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, T func, int blockSize, size_t dynamicSmemSize, unsigned int flags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
static __inline__ __device__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGraphKernelNodeSetParam(cudaGraphDeviceNode_t node, size_t offset, const T &value)
|
|
|
{
|
|
|
return cudaGraphKernelNodeSetParam(node, offset, &value, sizeof(T));
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
#undef __DEPRECATED__
|
|
|
#undef __CDPRT_DEPRECATED
|
|
|
#undef __CUDA_INTERNAL_USE_CDP2
|
|
|
|
|
|
#endif
|
|
|
|