mirror of
				https://github.com/NVIDIA/cuda-samples.git
				synced 2025-11-04 15:47:50 +08:00 
			
		
		
		
	Merge branch 'master' into 'cuda_a_dev'
graphConditionalNodes: Change launch dimension initialization for better cross-platform compatibility (#346) See merge request cuda-samples/cuda-samples!93
This commit is contained in:
		
						commit
						3f97ef1288
					
				@ -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