Skip to content

Conversation

@jhalakpatel
Copy link
Collaborator

@jhalakpatel jhalakpatel commented Sep 28, 2024

#229

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 force-pushed the jhalakp-non-linear-strides branch 2 times, most recently from 12376ed to 5863d9b Compare September 28, 2024 07:46
@jhalakpatel jhalakpatel force-pushed the jhalakp-non-linear-strides branch from 5863d9b to f906ce4 Compare September 29, 2024 21:01
@jhalakpatel jhalakpatel changed the title Add stride suppport Add stride field to Tripy tensor representations Sep 29, 2024
@jhalakpatel jhalakpatel marked this pull request as ready for review September 29, 2024 21:09
@jhalakpatel jhalakpatel force-pushed the jhalakp-non-linear-strides branch 10 times, most recently from 7770846 to c21f8aa Compare October 3, 2024 07:11
@jhalakpatel jhalakpatel force-pushed the jhalakp-non-linear-strides branch from c21f8aa to c8cea81 Compare October 3, 2024 18:48
@jhalakpatel jhalakpatel changed the title Add stride field to Tripy tensor representations Add checks for non-canonical strides Oct 3, 2024
@jhalakpatel jhalakpatel force-pushed the jhalakp-non-linear-strides branch 2 times, most recently from b27b41e to cc2b071 Compare October 3, 2024 19:18
@jhalakpatel jhalakpatel force-pushed the jhalakp-non-linear-strides branch 2 times, most recently from 3379879 to 01a005c Compare October 4, 2024 01:09
@jhalakpatel jhalakpatel force-pushed the jhalakp-non-linear-strides branch from 01a005c to 96bdf1d Compare October 4, 2024 01:13
MLIR-TensorRT requires strides for function arguments and results in canonical order.

NVIDIA#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 force-pushed the jhalakp-non-linear-strides branch from 96bdf1d to 1c1a13f Compare October 15, 2024 21:38
@jhalakpatel
Copy link
Collaborator Author

Closing this PR in favor of #273 since this one is running into CI failure due to fork based developement.

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