mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-07-01 12:00:49 +08:00
graphConditionalNodes: Additional tweaks to launch dimension initialization (#348)
This commit is contained in:
parent
8d901e745d
commit
9370f11e69
@ -95,8 +95,8 @@ void simpleIfGraph(void)
|
||||
// Use a kernel upstream of the conditional to set the handle value
|
||||
cudaGraphNodeParams params = {cudaGraphNodeTypeKernel};
|
||||
params.kernel.func = (void *)ifGraphKernelA;
|
||||
params.kernel.gridDim = 1;
|
||||
params.kernel.blockDim = 1;
|
||||
params.kernel.blockDim.x = params.kernel.blockDim.y = params.kernel.blockDim.z = 1;
|
||||
params.kernel.gridDim.x = params.kernel.gridDim.y = params.kernel.gridDim.z = 1;
|
||||
params.kernel.kernelParams = kernelArgs;
|
||||
kernelArgs[0] = &dPtr;
|
||||
kernelArgs[1] = &handle;
|
||||
@ -496,8 +496,8 @@ void simpleSwitchGraph(void)
|
||||
// Use a kernel upstream of the conditional to set the handle value
|
||||
cudaGraphNodeParams params = {cudaGraphNodeTypeKernel};
|
||||
params.kernel.func = (void *)switchGraphKernelA;
|
||||
params.kernel.gridDim = 1;
|
||||
params.kernel.blockDim = 1;
|
||||
params.kernel.blockDim.x = params.kernel.blockDim.y = params.kernel.blockDim.z = 1;
|
||||
params.kernel.gridDim.x = params.kernel.gridDim.y = params.kernel.gridDim.z = 1;
|
||||
params.kernel.kernelParams = kernelArgs;
|
||||
kernelArgs[0] = &dPtr;
|
||||
kernelArgs[1] = &handle;
|
||||
|
Loading…
x
Reference in New Issue
Block a user