mirror of https://github.com/llvm/torch-mlir
784156a998
This finishes removing the dependence on the basicpy dialect! Changes: - Add `!torch.bool` type and replace use of `!basicpy.BoolType` in Torch-related code. - Rename BuiltinTensorize to BackendTypeConversion since now it handles bool conversions (and, when we add !torch.int and !torch.float, it will handle those as well), and generalize the related utilities (I also moved them to Torch/Transforms since they aren't really part of Torch/IR). - Add `torch.to_i1` and `torch.from_i1` ops for materializations - [cleanup] Reorganize `torch.constant.*` ops in TorchOps.td - Remove dependency of `torch` dialect on `basicpy` dialect and also `std` dialect. For `std`, we use some call related ops, but the `torch` dialect itself never produces them (we have passes that do though). This is fairly mechanical. Recommended review order: - New stuff in Torch/IR - New BuiltinTypeConversion files. - Mechnical fixups elsewhere. |
||
---|---|---|
.. | ||
annotations | ||
README.md | ||
functions-that-call-methods.py | ||
functions.py | ||
list.py | ||
methods-derefine.py | ||
methods-locations.py | ||
methods.py | ||
object-identity-error-submodule.py | ||
object-identity-error.py | ||
object-identity-torch-bug.py | ||
object-identity.py | ||
prim.py | ||
primitives.py | ||
quantization.py | ||
strings.py | ||
submodules-select.py | ||
submodules.py | ||
tensors.py | ||
tuple.py |
README.md
ivalue_import
Most of the tests in this directory test importing of TorchScript
torch::jit::Module
's.
Modules are just one of many types of c10::IValue's and recursively contain c10::IValue's. Thus, the work of importing TorchScript modules is mainly about importing the wide variety of possible c10::IValue's, hence the name of this directory and the corresponding code in ivalue_importer.cpp that it exercises.