mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 20:19:53 +00:00
FindCUDA: Filter unrelated content in compute capabilities output
Working around CUDA-level nvrm_gpu log statements to stdout on some embedded platforms (ex. Drive PX2). See-also: https://github.com/pytorch/pytorch/issues/11518#issue-359113249
This commit is contained in:
parent
7162630bee
commit
bfd93b73a0
@ -109,6 +109,9 @@ function(CUDA_DETECT_INSTALLED_GPUS OUT_VARIABLE)
|
||||
RUN_OUTPUT_VARIABLE compute_capabilities)
|
||||
endif()
|
||||
|
||||
# Filter unrelated content out of the output.
|
||||
string(REGEX MATCHALL "[0-9]+\\.[0-9]+" compute_capabilities "${compute_capabilities}")
|
||||
|
||||
if(run_result EQUAL 0)
|
||||
string(REPLACE "2.1" "2.1(2.0)" compute_capabilities "${compute_capabilities}")
|
||||
set(CUDA_GPU_DETECT_OUTPUT ${compute_capabilities}
|
||||
|
Loading…
Reference in New Issue
Block a user