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