forked from MagmaDNN/magmadnn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.device
42 lines (33 loc) · 1.12 KB
/
make.device
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# make.device
# add gpu specific compilation flags
ifneq ($(findstring Kepler, $(GPU_TARGET)),)
MIN_ARCH ?= 300
NV_SM += -gencode arch=compute_30,code=sm_30
NV_SM += -gencode arch=compute_35,code=sm_35
NV_COMP := -gencode arch=compute_35,code=compute_35
endif
ifneq ($(findstring Maxwell, $(GPU_TARGET)),)
MIN_ARCH ?= 500
NV_SM += -gencode arch=compute_50,code=sm_50
NV_SM += -gencode arch=compute_52,code=sm_52
NV_COMP := -gencode arch=compute_52,code=compute_52
endif
ifneq ($(findstring Pascal, $(GPU_TARGET)),)
MIN_ARCH ?= 600
NV_SM += -gencode arch=compute_60,code=sm_60
NV_SM += -gencode arch=compute_61,code=sm_61
NV_COMP := -gencode arch=compute_61,code=compute_61
endif
ifneq ($(findstring Volta, $(GPU_TARGET)),)
MIN_ARCH ?= 700
NV_SM += -gencode arch=compute_70,code=sm_70
NV_COMP := -gencode arch=compute_70,code=compute_70
endif
ifneq ($(findstring Tesla, $(GPU_TARGET)),)
MIN_ARCH ?= 750
NV_SM += -gencode arch=compute_75,code=sm_75
NV_COMP := -gencode arch=compute_75,code=compute_75
endif
ifeq ($(NV_COMP),)
$(error GPU_TARGET, is $(GPU_TARGET), must contain one or more of Kepler, Maxwell, Pascal, Volta, and Tesla)
endif