Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This contributes the following:
torch.tensor.add
torch.tensor.norm
- this resolves the expected test case's API issue (NormalizeModule_basic) but results in an IR failure due to some additional pass in torch-mlir lowering thetorch.aten.norm.ScalarOpt_dim
totorch.aten.linalg_vector_norm
using the operand value, however we match the raw IR so I added this to xfails, as it is functionally the same.*args
signature, adding back the original pybind is still necessary to handle the case where dims is passed by keywordlayout
andmemory_layout
enum classes toIntEnum
so that they can be readily converted to integers where necessary, this resolves issues of the type:While this last change does resolve a number of test cases, it is worth noting that for one case:
ToDtypeLayoutStridedModule_basic
the API failure is resolved but the case still fails due to:emitted from here
I couldn't find a decomposition for this op (
aten.to.dtype_layout
) inDecomposeComplexOps.cpp
so this may be something missing from torch-mlir, but if its better to remove it from the PR that's fine too - this is only relevant to changing thelayout
enum. @makslevental