mirror of https://github.com/llvm/torch-mlir
179105ca3e
These tests pass on the reference backend. - Add aten.linear op + shape xfer function + ATen->Linalg lowering. - Note: this needs to be more automated, and needs to cover more cases. - Current not implemented caveats: - size-1 broadcasting for bias vector (either static-size-1 or ? case) - higher-rank aten.linear ops (not produced by torch.nn.Linear though) - type promotion (still don't even know the exact rules here) - Add folder for torch.derefine op. Now the inliner can clean it up as it inlines. (call boundaries are a main place we need to insert torch.derefine) This is brittle -- the other important case is control flow which will need to be handled via an extension to RefineTypes.cpp (as will more robust call handling). River has an in-flight patch to update it to the new dataflow framework so I didn't want to do anything intrusive here. - Also adjust torch.derefine syntax to use the keyword `to` instead of `->`, as most type-only, cast-like ops do. |
||
---|---|---|
.. | ||
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 | ||
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.