torch-mlir/test/Dialect/Torch
Sean Silva 30356c41c8 Add torch-adjust-calling-conventions pass.
This pass incorporates torch.type_bound info and also removes NoneType
returns (eventually it will rewrite tuple types too, but can't yet
because !basicpy.TupleType doesn't track element types).

Recommend looking at adjust-calling-conventions.mlir first to see what
it is doing, and holding your nose for the implementation of the pass.
I decided to implement this with the conversion framework, because it
gives us *some* goodies for type conversion -- mainly avoiding large
amounts of tricky RAUW dances. Unfortunately, the conversion framework
isn't a perfect fit for a couple reasons:
- the incorporation of torch.type_bound is a context-sensitive rewrite
  (requires looking at the arg attr, not just the type).
- NoneType conversion is 1->0, which requires some special handling
- (not implemented yet) 1->N tuple type conversions require special
  handling.
It's a little bit scary, but on balance doing it the other way would
have its own downsides.
2021-04-05 17:56:35 -07:00
..
adjust-calling-conventions.mlir Add torch-adjust-calling-conventions pass. 2021-04-05 17:56:35 -07:00
globalize-object-graph-error.mlir Support multiple instances of a class in GlobalizeObjectGraph. 2021-03-11 19:21:07 -08:00
globalize-object-graph-free-functions.mlir Support multiple instances of a class in GlobalizeObjectGraph. 2021-03-11 19:21:07 -08:00
globalize-object-graph-initializers.mlir Give torch.global_slot an initializer region. 2021-02-26 16:24:19 -08:00
globalize-object-graph-methods.mlir Support multiple instances of a class in GlobalizeObjectGraph. 2021-03-11 19:21:07 -08:00
globalize-object-graph-module-uses-error.mlir Extend GlobalizeObjectGraph to handle torch.prim.GetAttr returning NnModuleType 2021-02-19 10:23:25 -08:00
globalize-object-graph-module-uses.mlir Support multiple instances of a class in GlobalizeObjectGraph. 2021-03-11 19:21:07 -08:00
globalize-object-graph-multiple-instances-error.mlir Support multiple instances of a class in GlobalizeObjectGraph. 2021-03-11 19:21:07 -08:00
globalize-object-graph-multiple-instances-multiple-module-args.mlir Support multiple instances of a class in GlobalizeObjectGraph. 2021-03-11 19:21:07 -08:00
globalize-object-graph-multiple-instances.mlir Support multiple instances of a class in GlobalizeObjectGraph. 2021-03-11 19:21:07 -08:00
globalize-object-graph-submodules.mlir Give torch.global_slot an initializer region. 2021-02-26 16:24:19 -08:00
globalize-object-graph-visibility.mlir Add ability to annotate TorchScript classes. 2021-02-25 11:28:34 -08:00
globalize-object-graph.mlir Give torch.global_slot an initializer region. 2021-02-26 16:24:19 -08:00
invalid.mlir Basic infra for annotate shapes and dtypes on arguments. 2021-04-01 18:40:03 -07:00
ops.mlir Implement GlobalizeObjectGraph transformation. 2021-02-18 18:18:47 -08:00
prepare-for-globalize-object-graph.mlir Support multiple instances of a class in GlobalizeObjectGraph. 2021-03-11 19:21:07 -08:00