seoulsky-field / CXRAIL-dev

CXRAIL-dev
MIT License
7 stars 0 forks source link

Hotfix: Multi-gpu seed fix error #93

Closed seoulsky-field closed 1 year ago

seoulsky-field commented 1 year ago

What

Why

Current seed fixing code uses torch.cuda.manual_seed(seed) = True. However, from PyTorch official docs, manual_seed function gets only current_device not counts devices and fix seeds all of devices. Instead, manual_seed_all function counts devices and fix seeds all of devices. You can reference PyTorch manual_seed function codes and PyTorch manual_seed_all function codes.

How