Skip to content

Conversation

@ysiraichi
Copy link
Collaborator

This PR refactors AsStrided node implementation, and improves its error handling by making it override SafeLower.

Key Changes:

  • Replaced Lower override by SafeLower
  • Inlined LowerAsStrided into the SafeLower implementation + comments
  • Added check CheckSpecFitsInput() at tracing and lowering time
  • Moved GetArrayStridePermutation() out of AsStrided class, and renamed it to GetDescendingOrderPermutation()
    • Returns a descending order permutation of the given span
  • Moved StrideIsSupported out of AsStrided class, and renamed it to AsStridedIsSupported()

@ysiraichi ysiraichi marked this pull request as draft November 26, 2025 19:49
@ysiraichi
Copy link
Collaborator Author

ysiraichi commented Nov 26, 2025

@ysiraichi ysiraichi force-pushed the ysiraichi/better-error-lower-as_strided branch from aaf562f to 3d76b46 Compare December 5, 2025 16:52
@ysiraichi ysiraichi marked this pull request as ready for review December 5, 2025 21:52
@ysiraichi ysiraichi merged commit 86e3974 into master Dec 8, 2025
20 checks passed
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