minnervva / torchdetscan

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

Report if an encountered non-deterministic function could be made deterministic through use of special pytorch function #54

Closed markcoletti closed 1 month ago

markcoletti commented 1 month ago

Some encountered non-deterministic functions could be deterministic if use_deterministic_algorithms(True) is used, so it would be nice to add a new boolean column that indicated whether a given function could benefit from that.

markcoletti commented 1 month ago

Works:

> python ./torchdetscan.py --csv ../../tests/pytorch_put_.py | column -s, -t 
path                         function  line  column  toggleable  argument                                                              notes
../../tests/pytorch_put_.py  put_      11    0       True        accumulate=True will be non-deterministic if used with a CUDA tensor  
../../tests/pytorch_put_.py  put_      15    0       True        accumulate=False                                                      
../../tests/pytorch_put_.py  put_      19    0       True        accumulate will be False by default and therefore non-deterministic