I have tried using @torch.compile before the def of my function but I obtained the AttributeError: module 'torch' has no attribute 'compile' .
I have installed torchtriton as in the tutorial. Any ideas?
I do not find any clues about similar issues.
The reason is that compile is only available for PyTorch > 2.0 (https://pytorch.org/get-started/pytorch-2.0/) Either you have to install PyTorch > 2.0 like this (but is unstable):
!pip3 install numpy --pre torch --force-reinstall --index-url https://download.pytorch.org/whl/nightly/cu117
or just delete the compile. Compile only makes the model faster, but you should be able to train the model without compile and other PyTorch versions as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With