Questions about linter for PyTorch

Hi, guys.
I am currently trying to find some linters to do some static analysis for pt, in order to find some memory issues.

Are there any off-the-shelf static analysis tools we can use (both check Python, CPP, and cuda)? My check includes array overreach, memory access is not aligned and so on.

thanks in advance!

Maybe a start?

Thanks!
It looks good. However, torchfix seems a python linter bug can’t detect any C++/CUDA problem? Is there any C++/CUDA linters which are used in PyTorch CI?

Yes, CI runs linting tests and will fail. Check out the contribution guide for more information.

1 Like