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.

@github-actions
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.

@kshyatt
Copy link
Member Author

kshyatt commented Nov 14, 2025

Somehow I forgot to merge this? Going to do an update to make sure it still passes then set auto merge

@kshyatt kshyatt enabled auto-merge (squash) November 14, 2025 08:52
@kshyatt kshyatt merged commit 8d569fc into master Nov 14, 2025
18 of 19 checks passed
@kshyatt kshyatt deleted the ksh/zero_dim branch November 14, 2025 11:40
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