Skip to content

Question on check_transpose #1847

Answered by awni
zcbenz asked this question in Q&A
Feb 9, 2025 · 1 comments · 11 replies
Discussion options

You must be logged in to vote

I think the function is poorly named for what it does. It really does a check + optional copy in certain cases. And those cases are different for the CPU and GPU since the GPU can support irregular strides for the last two dimensions (in some cases).

  • For non-vectors checks if it's transposed. We support irregular strides in some cases. So the condition stx == arr.shape(-1) (for example) does not need to be satisfied for non-vectors
  • For vectors I assume we don't support irregular strides in the vector dimension so it will fallback to do a copy to make it contiguous

For the CPU there is no irregular stride support in either of the last two dimensions so we always do a copy if the basic co…

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@awni
Comment options

awni Feb 12, 2025
Maintainer

@zcbenz
Comment options

@awni
Comment options

awni Feb 12, 2025
Maintainer

@awni
Comment options

awni Feb 12, 2025
Maintainer

@zcbenz
Comment options

Answer selected by zcbenz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants