File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,18 @@ FC := nvfortran
2
2
#FCFLAGS := -O3 -Minform=inform -Minfo=all
3
3
FCFLAGS := -O3 -Minform=warn
4
4
5
- # TARGET=gpu
6
- TARGET=multicore
5
+ TARGET=gpu
6
+ # TARGET=multicore
7
7
8
8
NVARCH=$(shell which nvidia-smi > /dev/null && nvidia-smi -q | grep "Product Architecture")
9
+ ifeq ($(findstring Hopper,$(NVARCH)),Hopper)
10
+ $(info Hopper detected)
11
+ GPU = cc90
12
+ endif
13
+ ifeq ($(findstring Ada,$(NVARCH)),Ada)
14
+ $(info Ada detected)
15
+ GPU = cc89
16
+ endif
9
17
ifeq ($(findstring Ampere,$(NVARCH)),Ampere)
10
18
$(info Ampere detected)
11
19
GPU = cc80
@@ -29,7 +37,8 @@ ifeq ($(shell which jetson_clocks > /dev/null && echo 1),1)
29
37
#GPU = cc72
30
38
endif
31
39
ifeq ($(GPU),)
32
- $(error Your GPU architecture could not be detected. Set it manually.)
40
+ $(info Your GPU architecture could not be detected.)
41
+ GPU = ccnative
33
42
endif
34
43
GPUFLAG = -gpu=$(GPU)
35
44
You can’t perform that action at this time.
0 commit comments