### cuProfilerStart Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cudaProfiler_8h_source.html Starts the CUDA profiler. ```APIDOC ## cuProfilerStart ### Description Starts the CUDA profiler. ### Method Function ### Signature `CUresult CUDAAPI cuProfilerStart(void)` ### Parameters None. ### Return Value - **CUresult** - CUDA error code indicating success or failure. ### Remarks This function starts the profiler. ``` -------------------------------- ### Host pointer start address calculation Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__MEM.html Computes the starting address for host memory pointers in a 3D copy, using the source height, pitch, and offsets. ```c void* Start = (void*)((char*)srcHost+(srcZ*srcHeight+srcY)*srcPitch + srcXInBytes); ``` -------------------------------- ### Device pointer starting address calculation for cuMemcpy3DAsync Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__MEM.html For device pointers, the starting address is calculated using the provided formula. The formula uses dstDevice, dstZ, dstHeight, dstY, dstPitch, and dstXInBytes. ```cpp CUdeviceptr dstStart = dstDevice+(dstZ*dstHeight+dstY)*dstPitch+dstXInBytes; ``` -------------------------------- ### Device pointer start address calculation Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__MEM.html Computes the starting address for device memory pointers in a 3D copy, using the source height, pitch, and offsets. ```c CUdeviceptr Start = srcDevice+(srcZ*srcHeight+srcY)*srcPitch+srcXInBytes; ``` -------------------------------- ### Example of using the config parameter with cuLaunchKernelEx Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__EXEC.html Shows how to set a cooperative launch attribute and pass it via CUlaunchConfig to cuLaunchKernelEx. ```c CUlaunchAttribute coopAttr = {.id = CU_LAUNCH_ATTRIBUTE_COOPERATIVE, .value = 1}; CUlaunchConfig config = {... // set block and grid dimensions .attrs = &coopAttr, .numAttrs = 1}; cuLaunchKernelEx(&config, kernel, NULL, NULL); ``` -------------------------------- ### cuDeviceGetDevResource Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__GREEN__CONTEXTS.html Gets the specified type of resources available to a device. This is often the starting point for further partitioning or configuring of resources. ```APIDOC ## cuDeviceGetDevResource ### Description Get the `type` resources available to the `device`. This may often be the starting point for further partitioning or configuring of resources. ### Method CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource *resource, CUdevResourceType type) ### Parameters - **device** (CUdevice) - Device to get resource for - **resource** (CUdevResource*) - Output pointer to a CUdevResource structure - **type** (CUdevResourceType) - Type of resource to retrieve ### Returns CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_RESOURCE_TYPE, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE ### Notes - Not supported on 32-bit platforms. - See also cuDevResourceGenerateDesc. ``` -------------------------------- ### cuOccupancyMaxPotentialBlockSizeWithFlags Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__OCCUPANCY.html Suggest a launch configuration with reasonable occupancy. ```APIDOC ## cuOccupancyMaxPotentialBlockSizeWithFlags ### Description Suggest a launch configuration with reasonable occupancy. ### Function Signature ```c CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int *minGridSize, int *blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) ``` ### Parameters - **minGridSize** (int*) - Output - Pointer to the minimum grid size. - **blockSize** (int*) - Output - Pointer to the suggested block size. - **func** (CUfunction) - Input - The kernel function. - **blockSizeToDynamicSMemSize** (CUoccupancyB2DSize) - Input - Callback function to compute dynamic shared memory size from block size. - **dynamicSMemSize** (size_t) - Input - Dynamic shared memory size. - **blockSizeLimit** (int) - Input - Maximum block size limit. - **flags** (unsigned int) - Input - Flags for occupancy calculation. ### Return Value - **CUresult** - The CUDA error code indicating success or failure. ``` -------------------------------- ### cuOccupancyMaxPotentialBlockSize Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__OCCUPANCY.html Suggest a launch configuration with reasonable occupancy. ```APIDOC ## cuOccupancyMaxPotentialBlockSize ### Description Suggest a launch configuration with reasonable occupancy. ### Function Signature ```c CUresult cuOccupancyMaxPotentialBlockSize(int *minGridSize, int *blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) ``` ### Parameters - **minGridSize** (int*) - Output - Pointer to the minimum grid size. - **blockSize** (int*) - Output - Pointer to the suggested block size. - **func** (CUfunction) - Input - The kernel function. - **blockSizeToDynamicSMemSize** (CUoccupancyB2DSize) - Input - Callback function to compute dynamic shared memory size from block size. - **dynamicSMemSize** (size_t) - Input - Dynamic shared memory size. - **blockSizeLimit** (int) - Input - Maximum block size limit. ### Return Value - **CUresult** - The CUDA error code indicating success or failure. ``` -------------------------------- ### cuLaunchKernel Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Launches a kernel on the device. ```APIDOC ## cuLaunchKernel ### Description Launches a kernel on the device. ### Signature CUresult CUDAAPI cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void **kernelParams, void **extra); ### Parameters - **f** (CUfunction) - Kernel function handle. - **gridDimX** (unsigned int) - Grid dimension X. - **gridDimY** (unsigned int) - Grid dimension Y. - **gridDimZ** (unsigned int) - Grid dimension Z. - **blockDimX** (unsigned int) - Block dimension X. - **blockDimY** (unsigned int) - Block dimension Y. - **blockDimZ** (unsigned int) - Block dimension Z. - **sharedMemBytes** (unsigned int) - Dynamic shared memory size in bytes. - **hStream** (CUstream) - Stream to launch kernel in. - **kernelParams** (void**) - Array of kernel parameters. - **extra** (void**) - Extra launch options. ### Return Value CUresult - CUDA error code. ``` -------------------------------- ### cuOccupancyMaxPotentialBlockSizeWithFlags Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__OCCUPANCY.html Suggests a launch configuration with reasonable occupancy, with additional flags to control behavior. ```APIDOC ## cuOccupancyMaxPotentialBlockSizeWithFlags ### Description Suggest a launch configuration with reasonable occupancy, with additional flags to control behavior. This function is similar to cuOccupancyMaxPotentialBlockSize but accepts a flags parameter for extended options. ### Method CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int *minGridSize, int *blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) ### Parameters - **minGridSize** (int*) - Output - Returned minimum grid size needed to achieve the maximum occupancy - **blockSize** (int*) - Output - Returned maximum block size that can achieve the maximum occupancy - **func** (CUfunction) - Input - Kernel for which launch configuration is calculated - **blockSizeToDynamicSMemSize** (CUoccupancyB2DSize) - Input - A function that calculates how much per-block dynamic shared memory `func` uses based on the block size - **dynamicSMemSize** (size_t) - Input - Dynamic shared memory usage intended, in bytes - **blockSizeLimit** (int) - Input - The maximum block size `func` is designed to handle - **flags** (unsigned int) - Input - Flags to control the behavior of the occupancy calculation ### Returns CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_UNKNOWN ### Notes - This function is similar to cuOccupancyMaxPotentialBlockSize but with additional flags. - The API can also be used with context-less kernel CUkernel by querying the handle using cuLibraryGetKernel() and then passing it to the API by casting to CUfunction. Here, the context to use for calculations will be the current context. - This function may also return error codes from previous, asynchronous launches. ``` -------------------------------- ### cuStreamGetDevResource Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__GREEN__CONTEXTS.html Get stream resources. ```APIDOC ## cuStreamGetDevResource ### Description Get stream resources. ### Function Signature CUresult cuStreamGetDevResource(CUstream hStream, CUdevResource *resource, CUdevResourceType type) ### Parameters - **hStream** (CUstream) - The stream to query. - **resource** (CUdevResource*) - Output pointer to the resource. - **type** (CUdevResourceType) - The type of resource to get. ### Return Value - CUresult - CUDA error code indicating success or failure. ``` -------------------------------- ### cuDeviceGetDevResource Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__GREEN__CONTEXTS.html Get device resources. ```APIDOC ## cuDeviceGetDevResource ### Description Get device resources. ### Function Signature CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource *resource, CUdevResourceType type) ### Parameters - **device** (CUdevice) - The device to query. - **resource** (CUdevResource*) - Output pointer to the resource. - **type** (CUdevResourceType) - The type of resource to get. ### Return Value - CUresult - CUDA error code indicating success or failure. ``` -------------------------------- ### Using the extra parameter with CU_LAUNCH_PARAM_BUFFER_POINTER and CU_LAUNCH_PARAM_BUFFER_SIZE Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__EXEC.html Shows how to package kernel parameters into a single buffer and pass them to cuLaunchKernel via the extra parameter. The buffer must be populated before use, and the config array must be terminated with CU_LAUNCH_PARAM_END. This approach requires the application to know each parameter's size and alignment. ```c size_t argBufferSize; char argBuffer[256]; // populate argBuffer and argBufferSize void *config[] = { CU_LAUNCH_PARAM_BUFFER_POINTER, argBuffer, CU_LAUNCH_PARAM_BUFFER_SIZE, &argBufferSize, CU_LAUNCH_PARAM_END }; status = cuLaunchKernel(f, gx, gy, gz, bx, by, bz, sh, s, NULL, config); ``` -------------------------------- ### cuOccupancyMaxPotentialBlockSize Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__OCCUPANCY.html Suggests a launch configuration with reasonable occupancy, returning a block size and minimum grid size to achieve maximum occupancy. ```APIDOC ## cuOccupancyMaxPotentialBlockSize ### Description Suggest a launch configuration with reasonable occupancy. Returns in `*blockSize` a reasonable block size that can achieve the maximum occupancy (or, the maximum number of active warps with the fewest blocks per multiprocessor), and in `*minGridSize` the minimum grid size to achieve the maximum occupancy. ### Method CUresult cuOccupancyMaxPotentialBlockSize(int *minGridSize, int *blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) ### Parameters - **minGridSize** (int*) - Output - Returned minimum grid size needed to achieve the maximum occupancy - **blockSize** (int*) - Output - Returned maximum block size that can achieve the maximum occupancy - **func** (CUfunction) - Input - Kernel for which launch configuration is calculated - **blockSizeToDynamicSMemSize** (CUoccupancyB2DSize) - Input - A function that calculates how much per-block dynamic shared memory `func` uses based on the block size - **dynamicSMemSize** (size_t) - Input - Dynamic shared memory usage intended, in bytes - **blockSizeLimit** (int) - Input - The maximum block size `func` is designed to handle ### Returns CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_UNKNOWN ### Notes - If `blockSizeLimit` is 0, the configurator will use the maximum block size permitted by the device / function instead. - If per-block dynamic shared memory allocation is not needed, the user should leave both `blockSizeToDynamicSMemSize` and `dynamicSMemSize` as 0. - If per-block dynamic shared memory allocation is needed, then if the dynamic shared memory size is constant regardless of block size, the size should be passed through `dynamicSMemSize`, and `blockSizeToDynamicSMemSize` should be NULL. - Otherwise, if the per-block dynamic shared memory size varies with different block sizes, the user needs to provide a unary function through `blockSizeToDynamicSMemSize` that computes the dynamic shared memory needed by `func` for any given block size. `dynamicSMemSize` is ignored. An example signature is: ``` // Take block size, returns dynamic shared memory needed size_t blockToSmem(int blockSize); ``` - The API can also be used with context-less kernel CUkernel by querying the handle using cuLibraryGetKernel() and then passing it to the API by casting to CUfunction. Here, the context to use for calculations will be the current context. - This function may also return error codes from previous, asynchronous launches. ### See Also ::cudaOccupancyMaxPotentialBlockSize ``` -------------------------------- ### cuCtxGetDevResource Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__GREEN__CONTEXTS.html Get context resources. ```APIDOC ## cuCtxGetDevResource ### Description Get context resources. ### Function Signature CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource *resource, CUdevResourceType type) ### Parameters - **hCtx** (CUcontext) - The context to query. - **resource** (CUdevResource*) - Output pointer to the resource. - **type** (CUdevResourceType) - The type of resource to get. ### Return Value - CUresult - CUDA error code indicating success or failure. ``` -------------------------------- ### cuLaunchCooperativeKernel Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Launches a cooperative kernel. ```APIDOC ## cuLaunchCooperativeKernel ### Description Launches a cooperative kernel. ### Function Signature CUresult CUDAAPI cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void **kernelParams); ### Parameters - **f** (CUfunction) - Handle to the kernel function. - **gridDimX** (unsigned int) - Grid dimension in X. - **gridDimY** (unsigned int) - Grid dimension in Y. - **gridDimZ** (unsigned int) - Grid dimension in Z. - **blockDimX** (unsigned int) - Block dimension in X. - **blockDimY** (unsigned int) - Block dimension in Y. - **blockDimZ** (unsigned int) - Block dimension in Z. - **sharedMemBytes** (unsigned int) - Dynamic shared memory size in bytes. - **hStream** (CUstream) - Stream on which to launch. - **kernelParams** (void**) - Array of kernel parameters. ### Return Value - **CUresult** - CUDA error code indicating success or failure. ``` -------------------------------- ### cuStreamGetAttribute Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets an attribute of a stream. ```APIDOC ## cuStreamGetAttribute ### Description Gets an attribute of a stream. ### Function Signature CUresult CUDAAPI cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue *value_out); ### Parameters - **hStream** (CUstream) - The stream to query. - **attr** (CUstreamAttrID) - The attribute to get. - **value_out** (CUstreamAttrValue*) - Output pointer to receive the attribute value. ### Return Value CUresult - The CUDA error code indicating success or failure. ``` -------------------------------- ### cuLaunchGridAsync (Deprecated) Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Deprecated. Launches a kernel with a grid asynchronously. ```APIDOC ## cuLaunchGridAsync (Deprecated) ### Description Deprecated. Launches a kernel with a grid asynchronously. ### Function Signature __CUDA_DEPRECATED CUresult CUDAAPI cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream); ### Parameters - **f** (CUfunction) - Handle to the kernel function. - **grid_width** (int) - Grid width. - **grid_height** (int) - Grid height. - **hStream** (CUstream) - Stream on which to launch. ### Return Value - **CUresult** - CUDA error code indicating success or failure. ``` -------------------------------- ### cuStreamGetId Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets the ID of a stream. ```APIDOC ## cuStreamGetId ### Description Gets the ID of a stream. ### Function Signature CUresult CUDAAPI cuStreamGetId(CUstream hStream, unsigned long long *streamId); ### Parameters - **hStream** (CUstream) - The stream to query. - **streamId** (unsigned long long*) - Output pointer to receive the stream ID. ### Return Value CUresult - The CUDA error code indicating success or failure. ``` -------------------------------- ### cuStreamGetFlags Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets the flags of a stream. ```APIDOC ## cuStreamGetFlags ### Description Gets the flags of a stream. ### Function Signature CUresult CUDAAPI cuStreamGetFlags(CUstream hStream, unsigned int *flags); ### Parameters - **hStream** (CUstream) - The stream to query. - **flags** (unsigned int*) - Output pointer to receive the flags. ### Return Value CUresult - The CUDA error code indicating success or failure. ``` -------------------------------- ### cuLaunch Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/deprecated.html Deprecated function to launch a kernel. ```APIDOC ## cuLaunch ### Description Launches a kernel on the device. This function is deprecated. ### Signature `CUresult cuLaunch(CUfunction f)` ### Parameters - **f** (CUfunction) - Handle to the kernel function. ### Deprecation Deprecated. ``` -------------------------------- ### cuStreamGetPriority Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets the priority of a stream. ```APIDOC ## cuStreamGetPriority ### Description Gets the priority of a stream. ### Function Signature CUresult CUDAAPI cuStreamGetPriority(CUstream hStream, int *priority); ### Parameters - **hStream** (CUstream) - The stream to query. - **priority** (int*) - Output pointer to receive the priority. ### Return Value CUresult - The CUDA error code indicating success or failure. ``` -------------------------------- ### cuInit Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Initializes the CUDA driver API. ```APIDOC ## cuInit ### Description Initializes the CUDA driver API. Must be called before any other CUDA driver API function. ### Function Signature `CUresult cuInit(unsigned int Flags)` ### Parameters - **Flags** (unsigned int) - Input - Initialization flags. Currently must be 0. ### Return Value - **CUresult** - CUDA error code indicating success or failure. ### Error Handling - Returns CUDA_SUCCESS on success, or an error code on failure. ``` -------------------------------- ### cuCoredumpRegisterStartCallback Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__COREDUMP.html Registers a callback to be invoked when a GPU coredump begins. ```APIDOC ## cuCoredumpRegisterStartCallback ### Description Registers a callback to be invoked when a GPU coredump begins. ### Function Signature CUresult cuCoredumpRegisterStartCallback(CUcoredumpStatusCallback callback, void *userData, CUcoredumpCallbackHandle *callbackOut) ### Parameters - **callback** (CUcoredumpStatusCallback) - Required - The callback function to register. - **userData** (void *) - Required - User data to be passed to the callback. - **callbackOut** (CUcoredumpCallbackHandle *) - Required - Pointer to a handle that will receive the registered callback handle. ### Return Value - **CUresult** - The return status of the function call. ``` -------------------------------- ### cuKernelGetName Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets the name of a kernel. ```APIDOC ## cuKernelGetName ### Description Gets the name of a kernel. ### Function Signature `CUresult CUDAAPI cuKernelGetName(const char **name, CUkernel hfunc);` ### Parameters - **name** (const char**) - Required - Pointer to store the kernel name. - **hfunc** (CUkernel) - Required - Kernel handle. ### Return Value - **CUresult** - CUDA error code indicating success or failure. ``` -------------------------------- ### CUresult cuLaunchHostFunc(...) Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__EXEC.html Launches a host function on a given stream. The source text only mentions the function signature without parameters description. ```APIDOC ## CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void *userData) ### Description This function is mentioned but not fully documented in the source text. It appears to launch a host function on a stream. No further details are provided in the source. ``` -------------------------------- ### cuKernelGetAttribute Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets an attribute of a kernel. ```APIDOC ## cuKernelGetAttribute ### Description Gets an attribute of a kernel. ### Function Signature `CUresult CUDAAPI cuKernelGetAttribute(int *pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev);` ### Parameters - **pi** (int*) - Required - Pointer to store the attribute value. - **attrib** (CUfunction_attribute) - Required - Attribute to query. - **kernel** (CUkernel) - Required - Kernel handle. - **dev** (CUdevice) - Required - Device handle. ### Return Value - **CUresult** - CUDA error code indicating success or failure. ``` -------------------------------- ### cuCheckpointProcessGetState Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets the checkpoint state of a process. ```APIDOC ## cuCheckpointProcessGetState ### Description Gets the checkpoint state of a process. ### Function Signature `CUresult CUDAAPI cuCheckpointProcessGetState(int pid, CUprocessState *state);` ### Parameters - `pid` (int) - Process ID. - `state` (CUprocessState*) - Output state. ### Return Value - `CUresult` - CUDA error code indicating success or failure. ``` -------------------------------- ### cuLaunch Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__EXEC__DEPRECATED.html Launches a CUDA function. ```APIDOC ## cuLaunch ### Description Launches a CUDA function. ### Function Signature CUresult cuLaunch(CUfunction f) ### Parameters - **f** (CUfunction) - The function to launch. ### Return Value CUresult - The CUDA result code. ``` -------------------------------- ### cuTexRefGetAddress Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets the address of a texture reference. ```APIDOC ## cuTexRefGetAddress ### Description Gets the address of a texture reference. ### Signature `CUresult CUDAAPI cuTexRefGetAddress(CUdeviceptr_v1 *pdptr, CUtexref hTexRef);` ### Parameters - **pdptr** (CUdeviceptr_v1*) - Output pointer to store the device pointer. - **hTexRef** (CUtexref) - Texture reference handle. ### Return Value - **CUresult** - CUDA error code indicating success or failure. ``` -------------------------------- ### cuLaunchGrid Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__EXEC__DEPRECATED.html Launches a CUDA function. ```APIDOC ## cuLaunchGrid ### Description Launches a CUDA function. ### Function Signature CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) ### Parameters - **f** (CUfunction) - The function to launch. - **grid_width** (int) - Grid width. - **grid_height** (int) - Grid height. ### Return Value CUresult - The CUDA result code. ``` -------------------------------- ### cuGreenCtxGetDevResource Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__GREEN__CONTEXTS.html Get green context resources. ```APIDOC ## cuGreenCtxGetDevResource ### Description Get green context resources. ### Function Signature CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource *resource, CUdevResourceType type) ### Parameters - **hCtx** (CUgreenCtx) - The green context to query. - **resource** (CUdevResource*) - Output pointer to the resource. - **type** (CUdevResourceType) - The type of resource to get. ### Return Value - CUresult - CUDA error code indicating success or failure. ``` -------------------------------- ### cuGraphKernelNodeGetAttribute Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets an attribute of a kernel node. ```APIDOC ## cuGraphKernelNodeGetAttribute ### Description Gets an attribute of a kernel node. ### Signature CUresult CUDAAPI cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue *value_out); ### Parameters - **hNode** (CUgraphNode) - Input - Handle to the node. - **attr** (CUkernelNodeAttrID) - Input - Attribute ID. - **value_out** (CUkernelNodeAttrValue*) - Output - Pointer to store the attribute value. ### Return Value CUresult - CUDA error code. ``` -------------------------------- ### cuGraphExecGetFlags Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets the flags of a graph execution. ```APIDOC ## cuGraphExecGetFlags ### Description Gets the flags of a graph execution. ### Signature CUresult CUDAAPI cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t *flags); ### Parameters - **hGraphExec** (CUgraphExec) - Input - Handle to the graph execution. - **flags** (cuuint64_t*) - Output - Pointer to store the flags. ### Return Value CUresult - CUDA error code. ``` -------------------------------- ### cuLaunchGrid Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/deprecated.html Deprecated function to launch a kernel with a grid. ```APIDOC ## cuLaunchGrid ### Description Launches a kernel with a grid of specified dimensions. This function is deprecated. ### Signature `CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height)` ### Parameters - **f** (CUfunction) - Handle to the kernel function. - **grid_width** (int) - Grid width. - **grid_height** (int) - Grid height. ### Deprecation Deprecated. ``` -------------------------------- ### cuLaunchGridAsync Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/group__CUDA__EXEC__DEPRECATED.html Launches a CUDA function. ```APIDOC ## cuLaunchGridAsync ### Description Launches a CUDA function. ### Function Signature CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) ### Parameters - **f** (CUfunction) - The function to launch. - **grid_width** (int) - Grid width. - **grid_height** (int) - Grid height. - **hStream** (CUstream) - The stream handle. ### Return Value CUresult - The CUDA result code. ``` -------------------------------- ### cuGraphNodeGetDependencies Source: https://docs.nvidia.com/cuda/cuda-driver-api/cuda_driver_api/cuda_8h_source.html Gets the dependencies of a graph node. ```APIDOC ## cuGraphNodeGetDependencies ### Description Gets the dependencies of a graph node. ### Signature CUresult CUDAAPI cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode *dependencies, CUgraphEdgeData *edgeData, size_t *numDependencies); ### Parameters - **hNode** (CUgraphNode) - Input - Handle to the node. - **dependencies** (CUgraphNode*) - Output - Array of dependency nodes. - **edgeData** (CUgraphEdgeData*) - Output - Array of edge data. - **numDependencies** (size_t*) - Input/Output - Pointer to the number of dependencies. ### Return Value CUresult - CUDA error code. ```