CUDA Runtime API - Nvidia

1y ago
24 Views
1 Downloads
3.21 MB
553 Pages
Last View : 4d ago
Last Download : 16d ago
Upload by : Gia Hauser
Transcription

CUDA Runtime APIAPI Reference ManualvRelease Version July 2019

Table of ContentsChapter 1. Difference between the driver and runtime APIs.1Chapter 2. API synchronization behavior.3Chapter 3. Stream synchronization behavior. 5Chapter 4. Graph object thread safety.7Chapter 5. Modules. 85.1. Device Management.9cudaChooseDevice. 9cudaDeviceGetAttribute. 10cudaDeviceGetByPCIBusId. 15cudaDeviceGetCacheConfig.16cudaDeviceGetLimit. 17cudaDeviceGetNvSciSyncAttributes. 18cudaDeviceGetP2PAttribute. 19cudaDeviceGetPCIBusId. idth. aDeviceSetLimit. 26cudaDeviceSetSharedMemConfig. 28cudaDeviceSynchronize. ceFlags.31cudaGetDeviceProperties. cudaIpcGetMemHandle. 40cudaIpcOpenEventHandle.41cudaIpcOpenMemHandle. 42cudaSetDevice. 43cudaSetDeviceFlags.44cudaSetValidDevices. 465.2. Thread Management [DEPRECATED]. 47CUDA Runtime APIvRelease Version ii

cudaThreadExit. 47cudaThreadGetCacheConfig.48cudaThreadGetLimit. 49cudaThreadSetCacheConfig. 50cudaThreadSetLimit.51cudaThreadSynchronize. 525.3. Error 3cudaGetLastError. 54cudaPeekAtLastError. 555.4. Stream Management. 56cudaStreamCallback t. 56cudaCtxResetPersistingL2Cache. 56cudaStreamAddCallback. 57cudaStreamAttachMemAsync. 58cudaStreamBeginCapture. 61cudaStreamCopyAttributes. 62cudaStreamCreate.62cudaStreamCreateWithFlags. 63cudaStreamCreateWithPriority. 64cudaStreamDestroy. 65cudaStreamEndCapture. o.68cudaStreamGetFlags. 69cudaStreamGetPriority. 70cudaStreamIsCapturing.71cudaStreamQuery. 72cudaStreamSetAttribute. 73cudaStreamSynchronize.73cudaStreamWaitEvent. 74cudaThreadExchangeStreamCaptureMode.755.5. Event Management. 77cudaEventCreate. 77cudaEventCreateWithFlags. 78cudaEventDestroy. 79cudaEventElapsedTime.80CUDA Runtime APIvRelease Version iii

cudaEventQuery. 81cudaEventRecord. 845.6. External Resource Interoperability. 85cudaDestroyExternalMemory. 85cudaDestroyExternalSemaphore. 86cudaExternalMemoryGetMappedBuffer. 87cudaExternalMemoryGetMappedMipmappedArray. aphore. 93cudaSignalExternalSemaphoresAsync. 96cudaWaitExternalSemaphoresAsync. 985.7. Execution Control.100cudaFuncGetAttributes. 100cudaFuncSetAttribute. onfig.103cudaGetParameterBuffer. 105cudaGetParameterBufferV2. 106cudaLaunchCooperativeKernel. aunchHostFunc. 111cudaLaunchKernel.112cudaSetDoubleForDevice. 114cudaSetDoubleForHost.1145.8. lock. 116cudaOccupancyMaxActiveBlocksPerMultiprocessor. thFlags.1185.9. Memory Management. 119cudaArrayGetInfo. aFreeArray.122cudaFreeHost. 123cudaFreeMipmappedArray. 124cudaGetMipmappedArrayLevel. 125CUDA Runtime APIvRelease Version iv

ostAlloc. loc. Array. 139cudaMallocHost.141cudaMallocManaged. cudaMemAdvise. 148cudaMemcpy. 152cudaMemcpy2D. 153cudaMemcpy2DArrayToArray. 155cudaMemcpy2DAsync. sync. . 163cudaMemcpy3D. 165cudaMemcpy3DAsync. 167cudaMemcpy3DPeer. 170cudaMemcpy3DPeerAsync. 171cudaMemcpyAsync.172cudaMemcpyFromSymbol. 173cudaMemcpyFromSymbolAsync. mcpyToSymbol. 178cudaMemcpyToSymbolAsync. 180cudaMemGetInfo. 181cudaMemPrefetchAsync. 182cudaMemRangeGetAttribute. 184CUDA Runtime APIvRelease Version v

cudaMemRangeGetAttributes. 186cudaMemset.

vRelease Version July 2019 CUDA Runtime API API Reference Manual