torch-mlir/include/npcomp/Dialect/Torch/IR
Sean Silva e749074bae Basic infra for annotate shapes and dtypes on arguments.
These allow users to annotate a known "type bound" on the argument,
which can seed shape/dtype inference. We don't rewrite the function
types as part of the import process (it will happen in a
yet-to-be-written pass) because:

1. We would need to interprocedurally rewrite all calls to keep the IR
   consistent. Currently, we have a place after GlobalizeObjectGraph but
   before we convert to tensors where this is convenient to do. Ideally,
   we would do this on the object graph representation.

1. We don't necessarily know that adjusting the function type is a legal
   calling convention change. The pass will have blessed knowledge (by
   the pass pipeline author) that adjusting the argument type based on
   the type bound is safe (which it frequently is).

2. Note that in principle, a type bound could be a fairly general thing
   (such as maximum sizes of dimensions, unions of multiple concrete
   types, etc.). The pass will in principle have logic to interpret the
   type bounds and to determine a suitable "best" (and legal) argument
   type.
2021-04-01 18:40:03 -07:00
..
CMakeLists.txt Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
OpInterfaces.h Add support for "trailing_" and "out" variants of various ops. 2021-03-19 10:34:50 -07:00
OpInterfaces.td Expose signature metadata to ops and implement ATenRecognizeKernelsPass pass. 2020-10-26 20:31:45 -07:00
TorchBase.td Basic infra for annotate shapes and dtypes on arguments. 2021-04-01 18:40:03 -07:00
TorchDialect.h Expose signature metadata to ops and implement ATenRecognizeKernelsPass pass. 2020-10-26 20:31:45 -07:00
TorchOps.h Support multiple instances of a class in GlobalizeObjectGraph. 2021-03-11 19:21:07 -08:00
TorchOps.td Support multiple instances of a class in GlobalizeObjectGraph. 2021-03-11 19:21:07 -08:00
TorchTypes.h Add initial TorchScript module importer 2021-01-28 11:55:17 -08:00
TorchTypes.td Add prim::device and handle derefining for prim::CallMethod 2021-03-11 14:10:09 -08:00