-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmycompile.m
26 lines (22 loc) · 951 Bytes
/
mycompile.m
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
addpath('matlab');
vl_setupnn
if ispc
cudnnRoot = 'C:\Program Files\NVIDIA GPU Computing Toolkit\cudnn-8.0-windows10-x64-v7\cuda';
cudarootdir = 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0';
vl_compilenn('enableGpu', true, ...
'cudaRoot', cudarootdir, ...
'cudnnRoot', cudnnRoot, ...
'cudaMethod', 'nvcc', ...
'enableCudnn', true, ...
'verbose', 1, ...
'debug', 0 ) ;
else
cudaArch = [...
'-gencode=arch=compute_35,code=\"sm_35,compute_35\" ' ...
'-gencode=arch=compute_52,code=\"sm_52,compute_52\" '...
'-gencode=arch=compute_61,code=\"sm_61,compute_61\"'];
vl_compilenn('enableGpu', true, ...
'cudaRoot', '/usr/local/cuda-8.0', ...
'enableCudnn', true, ...
'cudnnRoot', '/usr/local/cuda-8.0','verbose',1, 'cudaArch',cudaArch);
end