Skip to content

fix mapreducedim<bang> ambiguities with Adjoint, Transpose, PermutedDimsArray - #522

Closed
vpuri3 wants to merge 2 commits into
JuliaGPU:mainfrom
vpuri3:mapreducedim
Closed

vpuri3 wants to merge 2 commits into
JuliaGPU:mainfrom
vpuri3:mapreducedim

Conversation

@vpuri3

@vpuri3 vpuri3 commented Mar 6, 2024

Copy link
Copy Markdown
Contributor

Fixes part of #521.

@maleadt

maleadt commented Mar 8, 2024

Copy link
Copy Markdown
Member

Hmm, that's not a particularly satisfying solution.

In any case, can you add tests?

Comment thread src/host/mapreduce.jl
Base.mapreducedim!(f, op, R::AnyGPUArray, A::Broadcast.Broadcasted) = mapreducedim!(f, op, R, A)

# resolve ambiguities with Adjoint/Transpose
# https://github.com/JuliaLang/julia/blob/master/stdlib/LinearAlgebra/src/adjtrans.jl#L440-L448

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maleadt

maleadt commented Oct 7, 2026

Copy link
Copy Markdown
Member

Thanks for this, and sorry it sat for so long. GPUArrays 12 replaced this code (#790): mapreducedim! no longer drops singleton dims wrongly, and the ambiguity with LinearAlgebra's Adjoint/Transpose methods is fixed in #804, with tests, so I'm closing this one.

@maleadt maleadt closed this Oct 7, 2026
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