Repository navigation
Add Index Stride Type Support - #1265
Merged
cliffburdick merged 6 commits intoOct 19, 2026
Merged
Conversation
Explain the independent size and stride flags, the compatibility option, and the default 64-bit types. Clarify the limits of 32-bit types.
Fix stride conversions, overflow checks, and JIT settings. Add regression tests.
Collaborator
|
/build |
Contributor
[High impact] The reviewed changes appear safe to merge; no blocking issue remains. SummaryThe PR separates tensor size and stride widths while keeping
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
S[Size width option] --> I[index_t]
T[Stride width option] --> O[offset_t]
I --> L[Sizes and logical indexes]
O --> M[Strides and memory offsets]
D[Custom descriptor] --> W[Its own stride_type]
W --> A[Gathering and tensor access]
Reviews (4) · Last reviewed commit: "Fix size and stride handling issues" · Reviewed by Greptile |
Keep both headers and make upstream alias checks work with separate size and stride types.
MashrafeeAryan
marked this pull request as draft
October 14, 2026 17:58
Preserve custom stride widths in copies, accessors, alias checks, and printing. Check DLPack element counts against the index limit. Add regression tests and clarify the documentation.
MashrafeeAryan
marked this pull request as ready for review
October 14, 2026 19:08
Contributor
Author
|
Hi @cliffburdick, I fixed the issues Greptile pointed out. I would really appreciate some feedback whenever you have time. Thank you so much! |
Collaborator
|
/build |
cliffburdick
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this does
Allows tensor sizes and strides to use different integer widths.
Adds two independent build options:
MATX_BUILD_32_BIT_SIZESenables 32-bit sizes and logical indexes.MATX_BUILD_32_BIT_STRIDESenables 32-bit strides and memory offsets.Keeps
MATX_BUILD_32_BITworking as before by enabling both options. The default is still 64-bit sizes and 64-bit strides.This uses
index_tfor sizes and logical indexes, andoffset_tis used for strides and memory offsets.Testing
Tests were added for
Testing was done using:
I couldn't run all of the tests. The build is taking longer than expected. The latest run I did is still running for the past hour. I would really appreciate it if anyone would run the workflow for the tests and I can work any errors if tests fail.
Documentation
I updated
docs_input/build.rstto explain the separate options and howMATX_BUILD_32_BITenables both.Related issue
Closes #387