Skip to content

Conversation

kshyatt
Copy link
Member

@kshyatt kshyatt commented Aug 26, 2025

Right now if you try to take the transpose!/adjoint! of an array with one or more dimensions of size 0, you'll get an integer division error in the launch configuration step. Not ideal.

Copy link
Contributor

github-actions bot commented Aug 26, 2025

Your PR no longer requires formatting changes. Thank you for your contribution!

@maleadt
Copy link
Member

maleadt commented Sep 1, 2025

Isn't a length check simpler? Or any other reason you went with a specific axes comparison?

@kshyatt
Copy link
Member Author

kshyatt commented Sep 1, 2025

Mostly to follow the style above in the function

@maleadt
Copy link
Member

maleadt commented Sep 1, 2025

Still, doesn't seem very legible to me. I'd prefer a simple isempty(A) && return B or something.

@kshyatt
Copy link
Member Author

kshyatt commented Sep 2, 2025

Is there a good way to test this only on CUDA? I think size 0 GPU arrays are not allowed on Metal/oneAPI?

@maleadt
Copy link
Member

maleadt commented Sep 2, 2025

Size 0 arrays should always work, or at least we promise they do (so we avoid hitting the allocator when unsupported by the underlying toolkit); this is a bug in Metal.jl.

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.

2 participants