cuda - nvprof is using all available GPU's when profiling python script -


i using remote machine, has 2 gpu's, in order execute python script has cuda code. in order find can improve performance of code, trying use nvprof.

i have set on code want use 1 of 2 gpu's on remote machine, although, when calling nvprof --profile-child-processes ./myscript.py, process same id started on each of gpu's.

is there argument can give nvprof in order use 1 gpu profiling?

the cuda environment variable cuda_visible_devices can used restrict cuda runtime api use gpus. can try this:

cuda_visible_devices="0" nvprof --profile-child-processes ./myscript.py 

also, nvprof documented , has command line via nvprof --help. looking @ command-line help, see --devices switch appears limit @ least functions use particular gpus. try with:

nvprof --devices 0 --profile-child-processes ./myscript.py 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -