nebuly icon indicating copy to clipboard operation
nebuly copied to clipboard

Support XLA for both torch and tensorflow

Open diegofiori opened this issue 2 years ago • 2 comments

Description

Currently nebullvm does not support TF-built in compiler XLA, which also allows the model to be compiled on Google TPUs. XLA is available for JAX, TF and PyTorch. Details about the TensorFlow and PyTorch implementations can be found in the following links:

Integration

We should implement two new classes in nebullvm both inheriting from Compiler. They should implement the interfaces for PyTorch and TensorFlow of the XLA compiler. Note that XLA also supports reduced precision, so the quantization types must be managed too. For inspiration while coding the class interface you can analyse the Compilers built on top of TensorRT.

Note that XLA performance should be tested on a TPU for accessing its real performance.

TODO list

  • [ ] Implement a PoC of the feature on Colab
  • [ ] If not available a TPU, ping @valeriosofi for running the final version of the Colab notebook on Nebuly’s GCP account (Note that the debugging can be performed by yourself using other HW devices).
  • [ ] Analyse the impact of the feature respect the actual AutoBoost
  • [ ] If a positive impact of the feature is assessed we should implement it as a Compiler object else send your results to [email protected] detailing your findings and explaining why we should not proceed with the implementation of the feature
  • [ ] Fork the nebullvm repo https://github.com/nebuly-ai/nebullvm
  • [ ] Read the Contribution Guidelines
  • [ ] Create a PR to main explaining your changes and showing the improvements obtained with the XLA compilers respect the previous versions

diegofiori avatar Dec 13 '22 18:12 diegofiori

I'm gonna do it! 😁

comidan avatar Dec 13 '22 21:12 comidan

Hi @comidan, any news about this feature implementation? :)

valeriosofi avatar Jan 02 '23 11:01 valeriosofi