-
Notifications
You must be signed in to change notification settings - Fork 140
Description
Summary
We're using GraalPy to build PyTorch from source for a project that traces PyTorch models using torch.fx.symbolic_trace and converts them to StableHLO MLIR. The current patches support up to PyTorch 2.7.0, but PyTorch mainline is now at 2.11+.
Request
Please add compatibility patches for PyTorch 2.8, 2.9, 2.10, and 2.11 (or at least the latest stable release).
Context
- Use case: We embed GraalPy in a native-image to trace PyTorch models and export them to StableHLO for GPU kernel generation
- Current setup: GraalPy 25.0.1 + PyTorch 2.7.0 (working great!)
- Tracing APIs used:
torch.fx.symbolic_trace,torch.jit.trace,torch.jit.script
Current patch coverage
The graalpython/lib-graalpython/patches/ directory contains:
torch-1.13.1.patchtorch-2.2.1.patchtorch-2.4.1.patchtorch-2.7.0.patch
Why this matters
PyTorch 2.8+ includes improvements to the FX tracing infrastructure and better support for modern model architectures. Staying current with PyTorch versions helps us support newer models and take advantage of tracing improvements.
Workaround
We've bundled the torch-2.7.0.patch in our repo and it works well. We're happy to help test patches for newer versions if that would be useful.
Thank you for the excellent work on GraalPy - the PyTorch integration is impressive!