Skip to content
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

Remove unnecessary Const #3

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Conversation

pxl-th
Copy link
Member

@pxl-th pxl-th commented Oct 9, 2024

Fixes #2.

@Const on half_size_group is not needed, since it is an integer.
@Const on comparator function does not play well with AMDGPU for some reason (and I'm not sure it is needed), especially if it is a closure.

With these changes all tests on RX 7900XTX pass.
We probably should set up CI for testing.

@anicusan
Copy link
Member

anicusan commented Oct 9, 2024

Thank you for investigating and the fix! It does not affect performance on my machines (still 1.10.5), so I will merge this now, at least as a temporary fix.

It is odd though that this error only seems to appear in Julia 1.11; I tested the AMDGPU backend two weeks ago on 1.10.5 and it worked fine. @vchuravy is this something you know of?

And a few questions:

  1. Does @Const not make sense on integers or other POD types? In CUDA kernels they are used and can make a difference.
  2. Should we remove @Const from other closures? They're used in a few other places too.

@anicusan anicusan merged commit 8f240fe into JuliaGPU:main Oct 9, 2024
@pxl-th pxl-th deleted the pxl-th/amdgpu-fix branch October 9, 2024 23:49
@vchuravy
Copy link
Member

@Const only makes sense on array types, but it does use adapt so it might recursively go through structs

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.

Invalid IR for sortperm! on AMDGPU
3 participants