JuliaAttic / CUDArt.jl

Julia wrapper for CUDA runtime API
Other
79 stars 29 forks source link

Use NVML to query device status #60

Closed emreyolcu closed 7 years ago

emreyolcu commented 7 years ago

Hello,

filter_free currently looks at nvidia-smi output to determine busy devices. For driver version 352.39 (and probably some other recent releases), nvidia-smi no longer refers to running processes as "Compute processes" but just "Processes". As a result, the current version of filter_free cannot find any matches in the output.

I modified the function to use the more robust NVIDIA Management Library. In versions 8 and later of CUDA Toolkit, the library is already included. For those who do not have the library and prefer not to install it, I kept the nvidia-smi solution and fixed it to work with newer drivers without breaking backward compatibility.

timholy commented 7 years ago

Thanks, @yolcu. Sorry I wasn't paying attention for a good while, this looks really awesome.

vchuravy commented 7 years ago

Would be great to have this in the next release. @yolcu can you update this and squash it? Otherwise I will do so after #65 lands.

vchuravy commented 7 years ago

This will need to be rebased onto master to get CI to pass :)

emreyolcu commented 7 years ago

Updated and squashed. It should be good now.

vchuravy commented 7 years ago

Perfect. Thank you.