mirror of https://github.com/llvm/torch-mlir
f49ebf1690
This replaces the ad-hoc use of `i64` throughout the Torch layer, and helps to keep it crystal clear the distinction between `!torch.int` (which is modeling the Python `int` type) and the various types that serve as dtypes of tensors, which are a totally different type universe. Changes: - `!torch.int` type and C bindings. - Change `torch.constant.int` parser to not need the `: i64` at the end. - `m_TorchConstantInt` matcher to aid with matching constants. - BackendTypeConversion changes for `!torch.int` -> `i64` type conversion. - Refactor finalizing patterns in FinalizingBackendTypeConversionPass (they were getting very repetitive). - Mechanical rewriting of `!torch.int` to `i64` in all the tests, and `AnyTorchIntType` to `Torch_IntType` in the `.td` files. |
||
---|---|---|
.. | ||
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.