werner-duvaud / muzero-general

MuZero
https://github.com/werner-duvaud/muzero-general/wiki/MuZero-Documentation
MIT License
2.46k stars 606 forks source link

Can't train using GPU? The torch version for this environment is '1.10.0cpu', that is, CPU one. #213

Open SunilaAkbar opened 1 year ago

SunilaAkbar commented 1 year ago

Search before asking

Description

Hi,

I will appreciate if someone would suggest me that how to train using GPU, the cuda availability check turns out to be 'False' as the torch version for this environment is '1.10.0cpu', that is, the one using CPU (that's my understanding). Please correct me if I am wrong and direct me to the solution.

Thanks and Regards!

Additional context

No response

dillonmsandhu commented 1 year ago

Which Cuda version do you have? Updating pytorch may work for you.

SunilaAkbar commented 1 year ago

Hi Dillon,

Thanks for your feedback. I am using my base environment now and it is using GPU now. But now I have another error as follows:

"RuntimeError: module must have its parameters and buffers on device cuda:0 (device_ids[0]) but found one of them on device: cpu"

To overcome this I did the change "self.selfplay_on_gpu = torch.cuda.is_available()" as suggested in one of the same "Issues". By this, the self plays are now far less than the training steps. So no learning!