torch-mlir/projects/ltc/csrc/base_lazy_backend
Jae Hoon (Antonio) Kim 8951a8cc23
Replace c10::optional with std::optional (#3126)
They replaced all `c10::optional` usages with `std::optional` in
torchgen'd code in
fb90b4d4b2
causing the LTC build to break.

Replacing all usages of `c10::optional` with `std::optional` in
`projects/ltc` has fixed the issue

Issue: #3120
2024-04-09 18:38:33 +00:00
..
ops Replace c10::optional with std::optional (#3126) 2024-04-09 18:38:33 +00:00
utils Replace c10::optional with std::optional (#3126) 2024-04-09 18:38:33 +00:00
CMakeLists.txt Enable -Werror in lib/ and LTC. (#2841) 2024-01-30 23:33:21 -08:00
README.md Breakup python pytorch deps (#2582) 2023-11-19 12:10:19 -08:00
backend_impl.cpp Replace c10::optional with std::optional (#3126) 2024-04-09 18:38:33 +00:00
backend_impl.h Replace c10::optional with std::optional (#3126) 2024-04-09 18:38:33 +00:00
dynamic_ir.cpp Enable -Werror in lib/ and LTC. (#2841) 2024-01-30 23:33:21 -08:00
dynamic_ir.h Breakup python pytorch deps (#2582) 2023-11-19 12:10:19 -08:00
ir_builder.h Replace c10::optional with std::optional (#3126) 2024-04-09 18:38:33 +00:00
mlir_lowering_context.cpp Clang format refresh (#2812) 2024-01-29 12:59:33 -05:00
mlir_lowering_context.h Enable -Werror in lib/ and LTC. (#2841) 2024-01-30 23:33:21 -08:00
mlir_native_functions.cpp Replace c10::optional with std::optional (#3126) 2024-04-09 18:38:33 +00:00
mlir_node.cpp Clang format refresh (#2812) 2024-01-29 12:59:33 -05:00
mlir_node.h Clang format refresh (#2812) 2024-01-29 12:59:33 -05:00
mlir_node_lowering.cpp Replace c10::optional with std::optional (#3126) 2024-04-09 18:38:33 +00:00
mlir_node_lowering.h Clang format refresh (#2812) 2024-01-29 12:59:33 -05:00
shape_inference.cpp Replace c10::optional with std::optional (#3126) 2024-04-09 18:38:33 +00:00
tensor.cpp Clang format refresh (#2812) 2024-01-29 12:59:33 -05:00
tensor.h Clang format refresh (#2812) 2024-01-29 12:59:33 -05:00

README.md

Torch-MLIR Lazy Tensor Core Backend

Detailed Documentation

Detailed documentation about the architecture of this LTC backend is available here.

Summary

Contained within this directory are the components that implements the Torch-MLIR LTC backend. Note that the code style for LTC components is consistent with that of LTC itself, rather than the rest of Torch-MLIR.

The components are subclasses of the backend API interface classes found under torch/csrc/lazy/backend.

Importantly, the subclasses are still abstract classes. Pure virtual methods such as Compile were purposefully not overridden as Torch-MLIR does not know how to compile the model for the target hardware.

The intent is that vendor hardware specific plugins will subclass the Torch-MLIR backend classes and override the remaining pure virtual functions to complete the backend.

The Torch-MLIR LTC backend's job is to perform the lowering from ATen to MLIR. A hardware vendor's backend job is to take care of the actual compile and execution of the lowered MLIR.