Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / BUILDER / makefile / public / cuda / cudaVisual.mk
1 # Version : 0.0.4
2 # Author : Cedric.Bilat@he-arc.ch
3 #
4 # Attention
5 #
6 # (A1) Dans les d�finitions de variables ci-dessous, m�fiez-vous des espaces � la fin!
7 # (A2) Laisser espace apr�s le += de surcharge : exemple : xxx+= yyyy
8 #
9
10 ifndef __CUDA_VISUAL_PUBLIC_OPTION_MK__
11 __CUDA_VISUAL_PUBLIC_OPTION_MK__=true
12
13 ###############################################
14 # Cuda Visual Win #
15 ###############################################
16
17 ##################################
18 # public #
19 ##################################
20
21 ########################
22 # visual #
23 ########################
24
25 #Option de compilation
26 # Version minimale : vide
27 # Surcharger automatiquement (par exemple en fonction du type de la target)
28
29 #CXXFLAGS+=
30
31 #################
32 # Warning #
33 #################
34
35 #linkage dll
36 CXXFLAGS+= /MD
37
38 #################
39 # Optimisation #
40 #################
41
42 # General
43 CXX_OPTIMISATION+= /Ox # All optimisation
44
45 # CPU specific
46 #
47 #CXX_OPTIMISATION+= /arch:SSE # By default with 64bits processor
48 #CXX_OPTIMISATION+= /arch:SSE2 # By default with 64bits processor
49 #CXX_OPTIMISATION+= /arch:AVX # ko home
50 #X86_CXX_OPTIMISATION+= /arch:AVX2 # cuda2,i7 (from visual 2013)
51
52 #################
53 # linkage #
54 #################
55
56 #Option de linkage
57 # Version minimale : vide (sera surcharg�e)
58 # Surcharger automatiquement (par exemple en fonction du type de la target)
59
60 CXXLDFLAGS+=#
61
62 ########################
63 # nvcc #
64 ########################
65
66 #################
67 # target #
68 #################
69
70 # NVCCFLAGS
71 # https://developer.nvidia.com/cuda-gpus
72 # Quadro Fx4600 : sm_10
73 # Quadro nvs140M : sm_11
74 # GTX_295 : sm_13
75 # GTX 580 sm_20
76 # Tesla m2090 sm_20
77 # Quadro6000 sm_20
78 # Quadroplex 7000 sm_20
79 # GTX 680 sm_30
80 # Quadro k5000 sm_30
81 # Tesla k20c sm_35
82 # Gforce titan sm_35
83 # Quadro k6000 sm_35
84 # Tesla k40 sm_35
85
86 # NVCCFLAGS possibilities:
87 #
88 # -arch=<compute_xy> Generate PTX for capability x.y
89 # -code=<sm_xy> Generate binary for capability x.y, by default same as -arch
90 # -gencode arch=...,code=... Same as -arch and -code, but may be repeated (executable is bigger, and compilation time longer)
91
92 # Target : Syntaxe light (shorcut)
93 # : Avantage : short,easy, quick
94 # : Incovenient : only one target can be specify!
95 #
96 NVCCFLAGS+= -arch=sm_20
97 #
98 # Target : Syntaxe full
99 # : Avantage : many target can be specify!
100 # : : Allow jit compilation at runtime, for deploying in a gpu with higher arch than arch use for developpement.
101 #
102 # : Option : -arch : Virtual architecture
103 # : generate PTX (ptx code is the same as byte code in java)
104 # : Like java, a jit compilation at runtime is performed.
105 # : Jit compilatioonce is performed only once, fortunately a cache is used to persist a final binary image.
106 #
107 # : Option : -code : Real architecture
108 # : nvcc embeded a compiled code image in the executable for each specified architecture -arch,
109 # : Code image is a true binary load image for each real architecture (present at compilation time?), and ptx code for earch virtual architecture (not present at compilation time?)
110 #
111 #
112 #
113 # Enable or disable all following lignes
114 #NVCCFLAGS+= -gencode arch=compute_20,code=sm_20 #idem NVCCFLAGS+= -arch=sm_20
115 #NVCCFLAGS+= -gencode arch=compute_30,code=sm_30 #idem NVCCFLAGS+= -arch=sm_30
116 #NVCCFLAGS+= -gencode arch=compute_35,code=sm_35 #idem NVCCFLAGS+= -arch=sm_35
117 #NVCCFLAGS+= -gencode arch=compute_50,code=sm_50 #idem NVCCFLAGS+= -arch=sm_50
118
119 NVCCFLAGS+= -m64 #
120
121 #Option de compilation
122 # Version minimale : vide
123 # Surcharger automatiquement (par exemple en fonction du type de la target)
124
125 #################
126 # Optimisation #
127 #################
128
129 NVCCFLAGS+= -use_fast_math #idem -ftz=true -prec_div=false -prec_sqrt=false
130 NVCCFLAGS+= --fmad=true #
131
132 #################
133 # linkage #
134 #################
135
136 # Version minimale : vide (sera surcharg�e)
137 # Surcharger automatiquement (par exemple en fonction du type de la target)
138
139 NVCCLDFLAGS+=#
140
141 #################
142 # debug #
143 #################
144
145 #decommneter la ligne pour
146 # (1) empecher l'optimisation
147 # (2) activer les flag de debug
148
149 #DEBUG=true
150
151 #NVCCFLAGS+= -dryrun
152 #NVCCFLAGS+= -v
153
154 #################
155 # extension #
156 #################
157
158 #Injection de variable dans le code
159 # same as #define XXX YYY
160 # same as -DXXX
161 #Attention, pas mettre -D, ni #define, que XXX
162
163 CODE_DEFINE_VARIABLES+=#
164
165 # Injection automatique de lib windows standard
166 # true (ou n'importe quoi) pour activer!
167 # rien pour desactiver
168 # Version minimale : vide (avec # pour le montrer)
169
170 EXCLUDE_LIBRARY_FILES+=#
171 ADD_LIBRARY_FILES+=#
172
173 ###############################################
174 # End #
175 ###############################################
176
177 endif#__CUDA_VISUAL_PUBLIC_OPTION_MK__
178