Skip to content

Commit

Permalink
[CUDA] Fix build issue with version < 12.0
Browse files Browse the repository at this point in the history
- Default initialize CUDA_KERNEL_NODE_PARAMS
  • Loading branch information
Bensuo committed Mar 11, 2024
1 parent 91c9e91 commit b1c9d0b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/adapters/cuda/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
try {
// Set node param structure with the kernel related data
auto &ArgIndices = hKernel->getArgIndices();
CUDA_KERNEL_NODE_PARAMS NodeParams;
CUDA_KERNEL_NODE_PARAMS NodeParams = {};
NodeParams.func = CuFunc;
NodeParams.gridDimX = BlocksPerGrid[0];
NodeParams.gridDimY = BlocksPerGrid[1];
Expand All @@ -378,8 +378,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
NodeParams.blockDimZ = ThreadsPerBlock[2];
NodeParams.sharedMemBytes = LocalSize;
NodeParams.kernelParams = const_cast<void **>(ArgIndices.data());
NodeParams.kern = nullptr;
NodeParams.extra = nullptr;

// Create and add an new kernel node to the Cuda graph
UR_CHECK_ERROR(cuGraphAddKernelNode(&GraphNode, hCommandBuffer->CudaGraph,
Expand Down

0 comments on commit b1c9d0b

Please sign in to comment.