Skip to content

Fix GPU inference (2065) #2071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Fix GPU inference (2065) #2071

wants to merge 1 commit into from

Conversation

charleskawczynski
Copy link
Member

This PR fixes the GPU inference issue described in #2065. Closes #2065.

@charleskawczynski
Copy link
Member Author

On downside of this, I realized, is that this solution only works for data layouts that end with the field index, and only works on Julia 1.11.

An ideal solution would be to use an immutable version ofRef. We’ve had issues with Ref in the past, which is why we switched to using tuples.

We tried to recreate this issue with ordinary cuarrays, but we weren’t able to reproduce the error. Which suggests that there is something else different. Perhaps it’s worth taking a second look at this, since it could lead to a fix on our end, or a fix in GPUCompiler/julia inference.

@charleskawczynski
Copy link
Member Author

I did manage to make a reproducer in JuliaGPU/CUDA.jl#2623. I think the proper path forward is to further simplify the reproducer in that issue and resolve the compiler limitation (whether that be in Base or in CUDA.jl), so that this issue is properly fixed. I'm going to close this PR, since it's really only a monkey patch that is not really widely applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inference failure when broadcasting over multiple structs and a Field
1 participant