Skip to content

Commit

Permalink
Merge pull request #1426 from Bensuo/ben/cuda-param-fix
Browse files Browse the repository at this point in the history
[CUDA] Fix build issue with version < 12.0
  • Loading branch information
kbenzie committed Mar 12, 2024
2 parents 91c9e91 + b1c9d0b commit 1f6cbe6
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 1f6cbe6

Please sign in to comment.