torch-mlir/lib/Dialect/Torch/Transforms
Sean Silva 9ba77c6e13 Add InlineGlobalSlots pass.
This inlines global slots if possible. This allows them to participate
in folding, canonicalization, shape inference, etc.

Example use cases:
- inlining weights and biases that are readonly during inference
- inlining the "training" bool to allow stuff to fold away

For training use cases (especially internal training loop), we will need
something smarter to get good performance. That would look like an "SSA
formation" which promotes the global slots to tensors in the program,
flushing them back to the slots at the minimal number of necessary
places. We might want to let backends do that transformation though.
This also interacts with shape inference (type bounds on the slots to
even lower them to backends in the first place).
2021-04-27 12:18:54 -07:00
..
AdjustCallingConventions.cpp Add torch-adjust-calling-conventions pass. 2021-04-05 17:56:35 -07:00
CMakeLists.txt Add InlineGlobalSlots pass. 2021-04-27 12:18:54 -07:00
GlobalizeObjectGraph.cpp Bump llvm-project to 484b6648fdd4b104eaf7a2504dd07b60af2c9f8d 2021-04-22 18:12:55 -07:00
InlineGlobalSlots.cpp Add InlineGlobalSlots pass. 2021-04-27 12:18:54 -07:00
PassDetail.h Implement GlobalizeObjectGraph transformation. 2021-02-18 18:18:47 -08:00
Passes.cpp Add InlineGlobalSlots pass. 2021-04-27 12:18:54 -07:00
PrepareForGlobalizeObjectGraph.cpp Fix issue with unused functions in torch::jit::CompilationUnit 2021-04-20 12:00:35 -07:00
RefineTypes.cpp Bump llvm-project to 484b6648fdd4b104eaf7a2504dd07b60af2c9f8d 2021-04-22 18:12:55 -07:00