function [] = compile_easySim(N) cfg = coder.gpuConfig('mex'); cfg.GpuConfig.CompilerFlags = '--fmad=false'; cfg.GenerateReport = true; ARGS = cell(23,1); ARGS{1} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % V (membrane Voltage) ARGS{2} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % Gref (refractory conductance) ARGS{3} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % dGref (refractory conductance change on spike) ARGS{4} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % tau_ref (refractory time_constant) ARGS{5} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % Vth (spike threshold) ARGS{6} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % VsynE (excitatory synaptic reversal potential) ARGS{7} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % VsynI (inhibitory synaptic reversal potential) ARGS{8} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % GsynE (total excitatory synaptic conductance) ARGS{9} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % GsynI (total inhibitory synaptic conductance) ARGS{10} = coder.typeof(gpuArray(single(0)),[N 1], [0 0]); % maxGsynE ARGS{11} = coder.typeof(gpuArray(single(0)),[N 1], [0 0]); % maxGsynI ARGS{12} = coder.typeof(gpuArray(single(0)),[N N],[0 0]); % dGsyn (synaptic strength matrix) ARGS{13} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % tau_synE (excitatory synaptic decay time constant) ARGS{14} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % tau_synI (inhibitory synaptic decay time constant) ARGS{15} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % Cm (membrane capacitance) ARGS{16} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % Gl (leak conductance) ARGS{17} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % El (leak reversal potential) ARGS{18} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % Ek ARGS{19} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % dth ARGS{20} = coder.typeof(gpuArray(single(0)),[N 1],[0 0]); % Iapp ARGS{21} = coder.typeof(single(0),[1],[0]); % dt ARGS{22} = coder.typeof(gpuArray(false),[N 1],[0 0]); % ecells ARGS{23} = coder.typeof(gpuArray(false),[N 1],[0 0]); % icells codegen updateNet -args ARGS -nargout 5
However, when I do this I get the following error:
Use of CODER.TYPEOF to represent GPU inputs is supported only with GPU Coder. Use help codegen for more information on using this command.
This confuses me since I thought I was using GPU Coder. Does GPU Coder only refer to the app GUI where you must manually specify each input?
For reference the output of coder.checkGpuInstall is:
coder.checkGpuInstall Compatible GPU : PASSED CUDA Environment : PASSED Runtime : PASSED cuFFT : PASSED cuSOLVER : PASSED cuBLAS : PASSED cuDNN Environment : FAILED (Unable to find the 'NVIDIA_CUDNN' environment variable. Set 'NVIDIA_CUDNN' to point to the root directory of a NVIDIA cuDNN installation.) Basic Code Generation : PASSED Basic Code Execution : PASSED ans = struct with fields: gpu: 1 cuda: 1 cudnn: 0 tensorrt: 0 basiccodegen: 1 basiccodeexec: 1 deepcodegen: 0 deepcodeexec: 0 tensorrtdatatype: 0 profiling: 0
The only thing that fails is cuDNN but since I'm not trying to do deep learning this shouldn't cause problems.
gpucoder -script yourscript.m -tocode yourgpucoderproject.prj
coder.typeof(single(0), [N 1], 'Gpu', true)
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.