Commit 1d24b5e9 authored by Andrew Cohen's avatar Andrew Cohen

ljsCheckHIP

parent 10e94423
% mcc -m ljsCheckHIP
function ljsCheckHIP()
if ismac()
fprintf(1,' HIP not available for mac. fallback code will be used. \n')
h=msgbox(' HIP not available on the mac','ljsCheckHip');
return
end
if ispc() && HIP.Cuda.DeviceCount<=0
fprintf(1,' no cuda compatible device found. cuda support not enabled. fallback will be used.\n');
h=msgbox('NO cuda compatible devices found. leverjs will run, but accuracy is reduced',...
'ljsCheckHip');
return
end
if ~ispc()
if HIP.Cuda.DeviceCount>0
fprintf(1,'found Cuda device!\n');
h=msgbox('YES! cuda compatible device found! good job!',...
'ljsCheckHip');
else
fprintf(1,'no Cuda device found\n');
h=msgbox('NO cuda compatible devices found. leverjs will run, but accuracy is reduced',...
'ljsCheckHip');
end
return
end
try
valnames = winqueryreg('HKEY_LOCAL_MACHINE','SYSTEM\CurrentControlSet\Control\GraphicsDrivers\','TdrDelay');
fprintf(1,' HIP cuda support enabled in registry. Well done!\n');
h=msgbox('YES! cuda compatible device found AND registry values set! good job! did you remember to reboot after setting registry?',...
'ljsCheckHip');
catch
tdrPath=fullfile(pwd,'tdrDelay.reg');
res=system(['start regedt32 ' tdrPath]);
h=msgbox('after registry updated for cuda image processing, you must reboot computer!');
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment