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

avoid ReshapedArray using Int128 in metal kernel #379

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

chengchingwen
Copy link
Contributor

@chengchingwen chengchingwen commented Jul 2, 2024

The Base.ReshapedArray is using Int128 for computing the indices with Base.MultiplicativeInverses._mul_high. This PR adds a device override to avoid Int128. Without this PR, the test will error out with "unsupported use of i128 value".

fixes #332

@chengchingwen
Copy link
Contributor Author

I didn't notice that _mul_high is introduced after julia v1.10, so the approach here won't work with julia below 1.9. Any suggestions?

@chengchingwen
Copy link
Contributor Author

@tgymnich I update the code to handle older julia version. One failed test is because the GPUArrays test with LowerTriangular is assumed to fail with MtlArray, so this PR also fix it. However, I'm unsure why 1.9 failed. It doesn't happen locally.

@tgymnich
Copy link
Member

tgymnich commented Jul 2, 2024

@chengchingwen I also cannot reproduce the issue CI is having on 1.9.

@christiangnrd
Copy link
Contributor

christiangnrd commented Jul 2, 2024

I've seen the 1.9 issue before. It's sporadic and unrelated.

@chengchingwen can you submit a PR that links back to this PR to GPUArrays to unbreak the test?

@tgymnich
Copy link
Member

tgymnich commented Jul 2, 2024

We should probably also submit a similar patch to oneAPI.jl.

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.

ReshapedArray indexing broken because of Int128 operation
3 participants