Commit Graph

6 Commits (41aa562fb48aa11f1d30badf278cc9fb00ff80bd)

Author SHA1 Message Date
Sean Silva 31727f81d8 torch_mlir.compile: Allow ignoring traced shapes
In some cases, users know that a traced graph is valid for a wider set
of shapes than they originally traced it with. Provide an option for
users to ignore the shapes in the traced graph when they know it is
legal.

Fixes #997
2022-08-04 10:18:34 -07:00
Sean Silva 93f1c3138b torch_mlir.compile: Allow OutputType as a string.
A lot of code was super verbose with `torch_mlir.OutputType.XYZ`. Now,
you can simply do `"xyz"`. I updated a few examples.
2022-07-08 17:37:27 -07:00
powderluv cd79538a0c
Update test to pass with newer versions of tanh (#990) 2022-06-28 20:28:13 -07:00
Sean Silva ccc858f531 torch_mlir.compile: Fix API footgun
use_tracing=True was behaving unexpectedly because the handling of
single arguments was happening after the torch.jit.trace call.

This also fixes the check to specifically test for a torch.Tensor or
TensorPlaceholder so that both lists and tuples would be correctly
handled.
2022-06-05 18:10:07 -07:00
Sean Silva 2af53ce434 torch_mlir.compile: Add OutputType.RAW
This can help with development and reporting bugs.
2022-05-19 03:41:43 -07:00
Sean Silva ef9e4c95f2 torch_mlir.compile: add support for dynamic sizes.
We do this by inroducing a TensorPlaceholder class, which can be used to
specify dynamic sizes. Internally, we canonicalize all example inputs
to TensorPlaceholder's.

This commit also adds some basic testing, which was missing before.
2022-05-17 07:02:32 -07:00