Ansel
0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
nvidia_gpus.h
Go to the documentation of this file.
1
/*
2
This file is part of darktable,
3
Copyright (C) 2012-2013 johannes hanika.
4
Copyright (C) 2012-2014 Ulrich Pegelow.
5
Copyright (C) 2013 David Polák.
6
Copyright (C) 2013 Richard Levitte.
7
Copyright (C) 2013-2014, 2016 Tobias Ellinghaus.
8
Copyright (C) 2014 parafin.
9
Copyright (C) 2019 jakubfi.
10
Copyright (C) 2020 Pascal Obry.
11
Copyright (C) 2022 Martin Bařinka.
12
Copyright (C) 2025 Aurélien PIERRE.
13
14
darktable is free software: you can redistribute it and/or modify
15
it under the terms of the GNU General Public License as published by
16
the Free Software Foundation, either version 3 of the License, or
17
(at your option) any later version.
18
19
darktable is distributed in the hope that it will be useful,
20
but WITHOUT ANY WARRANTY; without even the implied warranty of
21
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
GNU General Public License for more details.
23
24
You should have received a copy of the GNU General Public License
25
along with darktable. If not, see <http://www.gnu.org/licenses/>.
26
*/
27
28
#ifndef DT_SYSTEM_NVIDIA_GPUS_H
29
#define DT_SYSTEM_NVIDIA_GPUS_H
30
31
#include <strings.h>
32
33
#ifndef __APPLE__
34
// strings and compute model versions vim-macro converted from http://developer.nvidia.com/cuda/cuda-gpus
35
// 2012/09/18.
36
// we're not really interested in updates, this is merely used to detect which gpus don't support sm_20
37
// (and we hope newer gpus will all do that)
38
static
const
char
*nvidia_gpus[] = {
39
// clang-format off
40
41
"Tesla C2075"
,
"2.0"
,
42
"Tesla C2050/C2070"
,
"2.0"
,
43
"Tesla C1060"
,
"1.3"
,
44
"Tesla C870"
,
"1.0"
,
45
"Tesla D870"
,
"1.0"
,
46
"Tesla K20"
,
"3.5"
,
47
"Tesla K10"
,
"3.0"
,
48
"Tesla M2050/M2070/M2075/M2090"
,
"2.0"
,
49
"Tesla S1070"
,
"1.3"
,
50
"Tesla M1060"
,
"1.3"
,
51
"Tesla S870"
,
"1.0"
,
52
"Quadro K5000"
,
"3.0"
,
53
"Quadro 6000"
,
"2.0"
,
54
"Quadro 5000"
,
"2.0"
,
55
"Quadro 4000"
,
"2.0"
,
56
"Quadro 4000 for Mac"
,
"2.0"
,
57
"Quadro 2000"
,
"2.1"
,
58
"Quadro 2000D"
,
"2.1"
,
59
"Quadro 600"
,
"2.1"
,
60
"Quadro FX 5800"
,
"1.3"
,
61
"Quadro FX 5600"
,
"1.0"
,
62
"Quadro FX 4800"
,
"1.3"
,
63
"Quadro FX 4800 for Mac"
,
"1.3"
,
64
"Quadro FX 4700 X2"
,
"1.1"
,
65
"Quadro FX 4600"
,
"1.0"
,
66
"Quadro FX 3800"
,
"1.3"
,
67
"Quadro FX 3700"
,
"1.1"
,
68
"Quadro FX 1800"
,
"1.1"
,
69
"Quadro FX 1700"
,
"1.1"
,
70
"Quadro FX 580"
,
"1.1"
,
71
"Quadro FX 570"
,
"1.1"
,
72
"Quadro FX 470"
,
"1.1"
,
73
"Quadro FX 380"
,
"1.1"
,
74
"Quadro FX 380 Low Profile"
,
"1.2"
,
75
"Quadro FX 370"
,
"1.1"
,
76
"Quadro FX 370 Low Profile"
,
"1.1"
,
77
"Quadro CX"
,
"1.3"
,
78
"Quadro NVS 450"
,
"1.1"
,
79
"Quadro NVS 420"
,
"1.1"
,
80
"Quadro NVS 300"
,
"1.2"
,
81
"Quadro NVS 295"
,
"1.1"
,
82
"Quadro Plex 7000"
,
"2.0"
,
83
"Quadro Plex 2200 D2"
,
"1.3"
,
84
"Quadro Plex 2100 D4"
,
"1.1"
,
85
"Quadro Plex 2100 S4"
,
"1.0"
,
86
"Quadro K500M"
,
"3.0"
,
87
"Quadro 5010M"
,
"2.0"
,
88
"Quadro 5000M"
,
"2.0"
,
89
"Quadro 4000M"
,
"2.1"
,
90
"Quadro 3000M"
,
"2.1"
,
91
"Quadro 2000M"
,
"2.1"
,
92
"Quadro 1000M"
,
"2.1"
,
93
"Quadro FX 3800M"
,
"1.1"
,
94
"Quadro FX 3700M"
,
"1.1"
,
95
"Quadro FX 3600M"
,
"1.1"
,
96
"Quadro FX 2800M"
,
"1.1"
,
97
"Quadro FX 2700M"
,
"1.1"
,
98
"Quadro FX 1800M"
,
"1.2"
,
99
"Quadro FX 1700M"
,
"1.1"
,
100
"Quadro FX 1600M"
,
"1.1"
,
101
"Quadro FX 880M"
,
"1.2"
,
102
"Quadro FX 770M"
,
"1.1"
,
103
"Quadro FX 570M"
,
"1.1"
,
104
"Quadro FX 380M"
,
"1.2"
,
105
"Quadro FX 370M"
,
"1.1"
,
106
"Quadro FX 360M"
,
"1.1"
,
107
"Quadro NVS 320M"
,
"1.1"
,
108
"Quadro NVS 160M"
,
"1.1"
,
109
"Quadro NVS 150M"
,
"1.1"
,
110
"Quadro NVS 140M"
,
"1.1"
,
111
"Quadro NVS 135M"
,
"1.1"
,
112
"Quadro NVS 130M"
,
"1.1"
,
113
"Quadro NVS 450"
,
"1.1"
,
114
"Quadro NVS 420"
,
"1.1"
,
115
"NVIDIA NVS 300"
,
"1.2"
,
116
"Quadro NVS 295"
,
"1.1"
,
117
"NVS 4200M"
,
"2.1"
,
118
"NVS 5100M"
,
"1.2"
,
119
"NVS 3100M"
,
"1.2"
,
120
"NVS 2100M"
,
"1.2"
,
121
"NVS 300"
,
"1.2"
,
122
"GeForce GTX 690"
,
"3.0"
,
123
"GeForce GTX 680"
,
"3.0"
,
124
"GeForce GTX 670"
,
"3.0"
,
125
"GeForce GTX 660 Ti"
,
"3.0"
,
126
"GeForce GTX 660"
,
"3.0"
,
127
"GeForce GTX 650"
,
"3.0"
,
128
"GeForce GTX 560 Ti"
,
"2.1"
,
129
"GeForce GTX 550 Ti"
,
"2.1"
,
130
"GeForce GTX 460"
,
"2.1"
,
131
"GeForce GTS 450"
,
"2.1"
,
132
"GeForce GTX 590"
,
"2.0"
,
133
"GeForce GTX 580"
,
"2.0"
,
134
"GeForce GTX 570"
,
"2.0"
,
135
"GeForce GTX 480"
,
"2.0"
,
136
"GeForce GTX 470"
,
"2.0"
,
137
"GeForce GTX 465"
,
"2.0"
,
138
"GeForce GTX 295"
,
"1.3"
,
139
"GeForce GTX 285"
,
"1.3"
,
140
"GeForce GTX 285 for Mac"
,
"1.3"
,
141
"GeForce GTX 280"
,
"1.3"
,
142
"GeForce GTX 275"
,
"1.3"
,
143
"GeForce GTX 260"
,
"1.3"
,
144
"GeForce GT 640"
,
"2.1"
,
145
"GeForce GT 630"
,
"2.1"
,
146
"GeForce GT 620"
,
"2.1"
,
147
"GeForce GT 610"
,
"2.1"
,
148
"GeForce GT 520"
,
"2.1"
,
149
"GeForce GT 440"
,
"2.1"
,
150
"GeForce GT 430"
,
"2.1"
,
151
"GeForce GT 420"
,
"1.0"
,
152
"GeForce GT 240"
,
"1.2"
,
153
"GeForce GTS 240"
,
"1.2"
,
154
"GeForce GT 220"
,
"1.2"
,
155
"GeForce 210"
,
"1.2"
,
156
"GeForce GTS 250"
,
"1.1"
,
157
"GeForce GTS 150"
,
"1.1"
,
158
"GeForce GT 130"
,
"1.1"
,
159
"GeForce GT 120"
,
"1.1"
,
160
"GeForce G100"
,
"1.1"
,
161
"GeForce 9800 GX2"
,
"1.1"
,
162
"GeForce 9800 GTX+"
,
"1.1"
,
163
"GeForce 9800 GTX"
,
"1.1"
,
164
"GeForce 9600 GSO"
,
"1.1"
,
165
"GeForce 9500 GT"
,
"1.1"
,
166
"GeForce 9400 GT"
,
"1.1"
,
167
"GeForce 8800 GTS"
,
"1.1"
,
168
"GeForce 8800 GTS 512"
,
"1.1"
,
169
"GeForce 8800 GT"
,
"1.1"
,
170
"GeForce 8800 GS"
,
"1.1"
,
171
"GeForce 8600 GTS"
,
"1.1"
,
172
"GeForce 8600 GT"
,
"1.1"
,
173
"GeForce 8500 GT"
,
"1.1"
,
174
"GeForce 8400 GS"
,
"1.1"
,
175
"GeForce 9400 mGPU"
,
"1.1"
,
176
"GeForce 9300 mGPU"
,
"1.1"
,
177
"GeForce 8300 mGPU"
,
"1.1"
,
178
"GeForce 8200 mGPU"
,
"1.1"
,
179
"GeForce 8100 mGPU"
,
"1.1"
,
180
"GeForce 8800 Ultra"
,
"1.0"
,
181
"GeForce 8800 GTX"
,
"1.0"
,
182
"GeForce GT 340"
,
"1.0"
,
183
"GeForce GT 330"
,
"1.0"
,
184
"GeForce GT 320"
,
"1.0"
,
185
"GeForce 315"
,
"1.0"
,
186
"GeForce 310"
,
"1.0"
,
187
"GeForce 9800 GT"
,
"1.0"
,
188
"GeForce 9600 GT"
,
"1.0"
,
189
"GeForce 9400GT"
,
"1.0"
,
190
"GeForce GTX 680M"
,
"3.0"
,
191
"GeForce GTX 675M"
,
"2.1"
,
192
"GeForce GTX 670M"
,
"2.1"
,
193
"GeForce GTX 660M"
,
"3.0"
,
194
"GeForce GT 650M"
,
"3.0"
,
195
"GeForce GT 640M"
,
"3.0"
,
196
"GeForce GT 640M LE"
,
"3.0"
,
197
"GeForce GT 635M"
,
"2.1"
,
198
"GeForce GT 630M"
,
"2.1"
,
199
"GeForce GT 620M"
,
"2.1"
,
200
"GeForce 610M"
,
"2.1"
,
201
"GeForce GTX 580M"
,
"2.1"
,
202
"GeForce GTX 570M"
,
"2.1"
,
203
"GeForce GTX 560M"
,
"2.1"
,
204
"GeForce GT 555M"
,
"2.1"
,
205
"GeForce GT 550M"
,
"2.1"
,
206
"GeForce GT 540M"
,
"2.1"
,
207
"GeForce GT 525M"
,
"2.1"
,
208
"GeForce GT 520MX"
,
"2.1"
,
209
"GeForce GT 520M"
,
"2.1"
,
210
"GeForce GTX 485M"
,
"2.1"
,
211
"GeForce GTX 470M"
,
"2.1"
,
212
"GeForce GTX 460M"
,
"2.1"
,
213
"GeForce GT 445M"
,
"2.1"
,
214
"GeForce GT 435M"
,
"2.1"
,
215
"GeForce GT 420M"
,
"2.1"
,
216
"GeForce GT 415M"
,
"2.1"
,
217
"GeForce GTX 480M"
,
"2.0"
,
218
"GeForce GTS 360M"
,
"1.2"
,
219
"GeForce GTS 350M"
,
"1.2"
,
220
"GeForce GT 335M"
,
"1.2"
,
221
"GeForce GT 330M"
,
"1.2"
,
222
"GeForce GT 320M"
,
"1.2"
,
223
"GeForce GT 325M"
,
"1.2"
,
224
"GeForce GT 240M"
,
"1.2"
,
225
"GeForce G210M"
,
"1.2"
,
226
"GeForce 310M"
,
"1.2"
,
227
"GeForce 305M"
,
"1.2"
,
228
"GeForce GTX 285M"
,
"1.1"
,
229
"GeForce GTX 280M"
,
"1.1"
,
230
"GeForce GTX 260M"
,
"1.1"
,
231
"GeForce 9800M GTX"
,
"1.1"
,
232
"GeForce 8800M GTX"
,
"1.1"
,
233
"GeForce GTS 260M"
,
"1.1"
,
234
"GeForce GTS 250M"
,
"1.1"
,
235
"GeForce 9800M GT"
,
"1.1"
,
236
"GeForce 9600M GT"
,
"1.1"
,
237
"GeForce 8800M GTS"
,
"1.1"
,
238
"GeForce 9800M GTS"
,
"1.1"
,
239
"GeForce GT 230M"
,
"1.1"
,
240
"GeForce 9700M GT"
,
"1.1"
,
241
"GeForce 9650M GS"
,
"1.1"
,
242
"GeForce 9700M GT"
,
"1.1"
,
243
"GeForce 9650M GS"
,
"1.1"
,
244
"GeForce 9600M GT"
,
"1.1"
,
245
"GeForce 9600M GS"
,
"1.1"
,
246
"GeForce 9500M GS"
,
"1.1"
,
247
"GeForce 8700M GT"
,
"1.1"
,
248
"GeForce 8600M GT"
,
"1.1"
,
249
"GeForce 8600M GS"
,
"1.1"
,
250
"GeForce 9500M G"
,
"1.1"
,
251
"GeForce 9300M G"
,
"1.1"
,
252
"GeForce 8400M GS"
,
"1.1"
,
253
"GeForce G210M"
,
"1.1"
,
254
"GeForce G110M"
,
"1.1"
,
255
"GeForce 9300M GS"
,
"1.1"
,
256
"GeForce 9200M GS"
,
"1.1"
,
257
"GeForce 9100M G"
,
"1.1"
,
258
"GeForce 8400M GT"
,
"1.1"
,
259
"GeForce G105M"
,
"1.1"
,
260
"GeForce G102M"
,
"1.1"
,
261
"GeForce G 103M"
,
"1.1"
,
262
"ION"
,
"1.0"
,
263
NULL, NULL
264
265
// clang-format on
266
};
267
#endif
268
269
static
int
dt_nvidia_gpu_supports_sm_20
(
const
char
*
model
)
270
{
271
#ifdef __APPLE__
272
// on Mac OSX the OpenCL driver does not seem to support inline asm - even with recent NVIDIA GPUs
273
return
0;
274
#else
275
int
i
= 0;
276
while
(!
IS_NULL_PTR
(nvidia_gpus[2 *
i
]))
277
{
278
if
(!strcasecmp(
model
, nvidia_gpus[2 *
i
]))
279
{
280
if
(nvidia_gpus[2 *
i
+ 1][0] >=
'2'
)
return
1;
281
return
0;
282
}
283
i
++;
284
}
285
// if we don't know the device, it's probably too new and all good.
286
return
1;
287
#endif
288
}
289
290
#endif
// DT_SYSTEM_NVIDIA_GPUS_H
291
292
// clang-format off
293
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
294
// vim: shiftwidth=2 expandtab tabstop=2 cindent
295
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
296
// clang-format on
i
const float i
Definition
colorspaces_inline_conversions.h:441
model
const char * model
Definition
iop/tonecurve.c:454
IS_NULL_PTR
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
Definition
macros.h:96
dt_nvidia_gpu_supports_sm_20
static int dt_nvidia_gpu_supports_sm_20(const char *model)
Definition
nvidia_gpus.h:269
src
system
nvidia_gpus.h
Generated by
1.9.8