torch-mlir/python/torch_mlir
Sambhav Jain 3e836d8dad
[fx_importer] Convert non-persistent buffers lifted as tensor constants (#2902)
The investigation is largely recorded in
https://github.com/llvm/torch-mlir/pull/2881, but this change allows us
to capture non-persistent buffers that were lifted as tensor constants
(after https://github.com/pytorch/pytorch/pull/118969 landed in upstream
PyTorch), and propagate them to `Torch` dialect as "frozen"
`torch.vtensor.literal`. I believe this patch should work with both
nightly and stable PyTorch, but will let CI confirm the same. Thanks
@stellaraccident for the valuable pointers and guidance.

---------

Co-authored-by: Vivek Khandelwal <vivekkhandelwal1424@gmail.com>
2024-02-13 12:38:32 -08:00
..
_mlir_libs [ci] Upgrade to new runners and disable unsupported jobs. (#2818) 2024-01-27 18:35:45 -08:00
dialects Upstream the ONNX importer. (#2636) 2023-12-12 19:02:51 -08:00
extras [fx_importer] Convert non-persistent buffers lifted as tensor constants (#2902) 2024-02-13 12:38:32 -08:00
tools/import_onnx Make the onnx importer more robust for internal/external and large models (#2794) 2024-01-31 21:58:43 -08:00
fx.py Rename torch_mlir.compile APIs and introduce FX based analogs (#2842) 2024-02-06 19:07:59 -08:00