minnervva / torchdetscan

This is a tool for finding non-deterministic functions in your pytorch code.
https://github.com/minnervva/torchdetscan
MIT License
1 stars 1 forks source link

torch.Tensor.put_() when accmulate = true #27

Closed markcoletti closed 7 months ago

markcoletti commented 7 months ago

Need to add special warning for put_() that it's non-determinism is dependent on the value of the accumulate arg and whether it's being used on a CUDA tensor. Since we do a static analysis we cannot know how a given put_ call is being used, so the best we can do is issue a warning to the user.

markcoletti commented 7 months ago

Works:

Linting file: pytorch_put_.py
Found non-deterministic function put_ at line 11, column 0 with accumulate=True that will be non-deterministic if used with a CUDA tensor
Found non-deterministic function put_ at line 15, column 0 because accumulate=False
Found non-deterministic function put_ at line 19, column 0 because accumulate keyword argument will be False by default and therefore non-deterministic.