Skip to content

Conversation

@jumerckx
Copy link
Collaborator

@jumerckx jumerckx commented Jan 9, 2025

Can't test end-to-end but the HLO contains the stores.

using Reactant, CUDA

A = ConcreteRArray(fill(1))

struct MyStruct{T, B}
    b::B
    A::T
end

function f!(tup)
    tup[1].A[] = 2
    return nothing
end

s = MyStruct(10, A)

f(s) = @cuda threads=1 f!((s, s))
@code_hlo optimize=false f(s);

argidx - 1,
0,
C_NULL,
),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since I moved argidx++ out of the loop, I'm not sure whether this is still correct because I don't really know what's happening here.

@jumerckx jumerckx requested a review from wsmoses January 9, 2025 22:30
@wsmoses
Copy link
Member

wsmoses commented Jan 10, 2025

@jumerckx to make review easier, can you rebase this on main?

@jumerckx
Copy link
Collaborator Author

@jumerckx to make review easier, can you rebase this on main?

Done

Copy link
Member

@wsmoses wsmoses left a comment

Choose a reason for hiding this comment

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

can you add a test with the repeated arg, otherwise lgtm

@wsmoses wsmoses force-pushed the jm/alias_linearize branch from 6b96fea to f8bd69a Compare January 10, 2025 16:44
@wsmoses
Copy link
Member

wsmoses commented Jan 10, 2025

@jumerckx can you add that as a test, then let's merge!

@jumerckx
Copy link
Collaborator Author

I'm afk til tomorrow but will add it then.

jumerckx and others added 2 commits January 11, 2025 11:45
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@wsmoses
Copy link
Member

wsmoses commented Jan 11, 2025

LGTM but I think there's a conflict that needs to be fixed to merge

jumerckx and others added 4 commits January 11, 2025 18:48
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@wsmoses wsmoses merged commit 7c2e390 into main Jan 13, 2025
27 of 38 checks passed
@wsmoses wsmoses deleted the jm/alias_linearize branch January 13, 2025 02:26
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