mirror of
				https://github.com/NVIDIA/cuda-samples.git
				synced 2025-11-04 07:27:49 +08:00 
			
		
		
		
	Merge branch 'peggyt_bug_fix' into 'master'
Bug 5056055: limit register usage to 128 per thread in debug mode See merge request cuda-samples/cuda-samples!110
This commit is contained in:
		
						commit
						2861e78272
					
				@ -13,6 +13,7 @@ set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
 | 
			
		||||
 | 
			
		||||
if(ENABLE_CUDA_DEBUG)
 | 
			
		||||
    set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G")        # enable cuda-gdb (may significantly affect performance on some targets)
 | 
			
		||||
    set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -maxrregcount=128") # limit register usage to 128 per thread to comply with the maximum number of 32-bit registers per SM
 | 
			
		||||
else()
 | 
			
		||||
    set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -lineinfo") # add line information to all builds for debug tools (exclusive to -G option)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user