Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions Tools/GNUMake/sites/Make.unknown
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,11 @@ ifeq ($(USE_CUDA),TRUE)
cuda_device_query_result := $(shell $(CUDA_HOME)/extras/demo_suite/deviceQuery | grep "CUDA Capability")
else
# try nvidia-smi, as deviceQuery is no longer distributed with CUDA 12 and up
cuda_device_query_result := $(shell nvidia-smi --query-gpu=compute_cap --format=csv,noheader)
cuda_device_query_result := $(shell nvidia-smi --query-gpu=compute_cap --format=csv,noheader || echo $(CUDA_ARCH))
endif
ifneq ($(cuda_device_query_result),)
TEMP_CUDA_ARCH = $(lastword $(cuda_device_query_result))
# CUDA_ARCH = $(subst .,,$(TEMP_CUDA_ARCH))
# We do this because pgfortran does not support all cuda arches.
ifeq ($(TEMP_CUDA_ARCH),3.5)
CUDA_ARCH = 35
else
CUDA_ARCH = $(firstword $(subst ., ,$(TEMP_CUDA_ARCH)))0
endif
CUDA_ARCH = $(subst .,,$(TEMP_CUDA_ARCH))
endif
endif
endif
Expand Down
Loading