Skip to content

Conversation

@jhalakpatel
Copy link
Collaborator

MLIR-TensorRT requires strides for function arguments and results in canonical order.

#252 adds a check to validate memref stride against a canonical stride order. In Tripy, memref strides are derived from framework DL Pack tensors. Creating a memref with a non-canonical DL Pack tensor stride throws an exception.

Add a try-catch block to catch such an exception and augment with suggestions on creating a DL Pack tensor with canonical stride for Tripy-supported frameworks.

Add unit tests to create a non-canonical stride tensor to validate exceptions and suggestions.

MLIR-TensorRT requires strides for function arguments and results in canonical order.

#252 adds a check to validate memref stride against a canonical stride order. In Tripy, memref strides are derived from framework DL Pack tensors. Creating a memref with a non-canonical DL Pack tensor stride throws an exception.

Add a try-catch block to catch such an exception and augment with suggestions on creating a DL Pack tensor with canonical stride for Tripy-supported frameworks.

Add unit tests to create a non-canonical stride tensor to validate exceptions and suggestions.
@jhalakpatel jhalakpatel merged commit 13dde1b into main Oct 15, 2024
1 of 2 checks passed
@jhalakpatel jhalakpatel deleted the jhalakp-non-linear-strides branch October 15, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants