Skip to content

[STABLE ABI] Stable Accessor shim #4052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

samanklesaria
Copy link
Collaborator

Although Accessors will eventually be ported to the stable ABI, this may take some time (as Array Refs need to have a representation in the stable ABI first). This PR offers an independent Accessor functionality we can use for the time being. This allows us to make progress on the stable ABI porting (which requires accessor functionality). Especially when it comes to 3 dimensional tensors and higher, writing the stride multiplication logic manually and indexing into the flat array produces code that is not particularly readable and makes it easy to make mistakes. I think using a simple Accessor abstraction is a better way forward. This PR includes tests for the abstraction. The tests are only defined for integer tensors, but as the accessor is templated, the index calculation logic does not depend on the underlying datatype, and we should not need to test other datatypes.

Copy link

pytorch-bot bot commented Aug 19, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/4052

Note: Links to docs will display an error until the docs builds have been completed.

❌ 8 New Failures

As of commit 44504ea with merge base bdd9c72 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed label Aug 19, 2025
@samanklesaria samanklesaria changed the title Stable Accessor shim [STABLE ABI] Stable Accessor shim Aug 19, 2025
@samanklesaria samanklesaria marked this pull request as ready for review August 19, 2025 20:07
@samanklesaria samanklesaria requested a review from a team as a code owner August 19, 2025 20:07
@samanklesaria samanklesaria marked this pull request as draft August 20, 2025 19:31
@samanklesaria samanklesaria marked this pull request as ready for review August 21, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant