Something similar to CUDA_VISIBLE_DEVICES

Hello there,

I hope everybody is doing great, is there a way to “hide” HPU devices similar to CUDA_VISIBLE_DEVICES?

Thanks,

Cheers,

Fra

Please refer to this doc.

Thanks a lot, I’ve tried it but it doesn’t seem to do the trick

import os

os.environ["HABANA_VISIBLE_DEVICES"] = "0,1"

print(hpu.device_count()) # prints 8

Thanks @Fra_Zuppi, will take a look and get back to you.

1 Like

Hey @Sayantan_S , any luck? :slight_smile:

Can you using -e HABANA_VISIBLE_DEVICES=6,7 --runtime=habana in your docker command and try hl-smi and see if you have 2 visible cards