asha97:

I checked using nvidia-smi ,all the 8 gpus are empty and even alloting 2 to3 gives same error ,it goes to cuda:0 again n again


This would mean that your single model is too large. You could count the number of parameters and buffers and calculate the theoretical size it would need on the GPU.



 asha97:

when I search for codes of pytorch using gpu, everywhere pycuda is refered


Could you post a link to this, please?