Repository navigation
Fix implicit product scans on GPU-backed DArrays - #860
Merged
Merged
Conversation
AMDGPU and oneAPI's generic accumulate defaults to zero, so lowering cumprod to accumulate(Base.mul_prod) zeroes each partition. Dispatch implicit product partitions through the backend's native cumprod while retaining explicit initialization on the first partition and the existing carry combination. Generic * keeps its distinct promotion behavior. Add both-axis GPU and small-integer/init CPU regressions. On the pinned Julia 1.11.9 / AMDGPU 2.1.0 environment, the same DArray checks go from 12 type passes plus 12 numerical failures to 24 passes. Registered CPU mapreduce passes 492 assertions, with 76 additional helper boundary checks. After 10 warm batches and five GC-counter samples, minimum allocations for 1,000 CPU helper calls fall from 1,424,000 bytes / 25,000 allocations to 240,000 / 8,000 on the implicit path. The explicit-init control is unchanged at 1,504,016 bytes / 28,001 allocations. These are scoped helper controls, not whole-task or GPU throughput measurements; hosted CI is not yet run. Written by an AI agent on jpsamaroo's review feedback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GPU-backed
cumprodcurrently scans each partition through genericaccumulate(Base.mul_prod, ...). AMDGPU and oneAPI default that operation to a zero initializer, which zeros the products. Use the backend's nativecumprodfor partitions without an explicit initializer, retaining first-part initialization, carry combination and small-integer promotion.Adds GPU coverage for both axes and explicit product initialization, plus CPU promotion regressions.
Validation:
The oneAPI registered accumulate block passes 8/8 on the Arc Pro B60, including real Float64 widening. An additional Float64 scan mismatch observed on master is under separate investigation; the passing candidate run does not establish a fix for it. Generic operator initialization and vendor queue/residency issues remain separate from this product repair.