Skip to content

[SYCL][CUDA][libclc] Add support for generic AS in atomics #5849

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 6 commits into from

Conversation

t4c1
Copy link
Contributor

@t4c1 t4c1 commented Mar 21, 2022

Adds support for generic address space in atomics.

Also fixes __attribute__((always_inline)) being in wrong place for some of the atomics (it was placed so it applied to some forward declaration of functions used in the implementation of the atomic, instead of the definition of atomic).

Also contains a fix for a bug in libclc remangler that caused wrong remangled names for some of the new functions in this PR (by @AidanBeltonS).

Closes #5215. Closes #5647.

Tests for this are enabled in intel/llvm-test-suite#929.

@t4c1 t4c1 requested a review from bader as a code owner March 21, 2022 16:27
@t4c1 t4c1 changed the title [SYCL][CUDA][libclc] Add support for atomics in generic AS [SYCL][CUDA][libclc] Add support for generic AS in atomics Mar 21, 2022
Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

@t4c1, please, fix tests on HIP platform and verify your patch with updated tests (i.e. add a comment "/verify with intel/llvm-test-suite#929").

@t4c1
Copy link
Contributor Author

t4c1 commented Mar 22, 2022

These unexpected passes on HIP do not seem to be related to my changes. I can reproduce them even with sycl branch. Also I did not realize I can run the tests myself. Thanks.

@t4c1
Copy link
Contributor Author

t4c1 commented Mar 22, 2022

/verify with intel/llvm-test-suite#929

@t4c1
Copy link
Contributor Author

t4c1 commented Mar 22, 2022

@bader I don't think this worked.

@bader
Copy link
Contributor

bader commented Mar 22, 2022

These unexpected passes on HIP do not seem to be related to my changes. I can reproduce them even with sycl branch.

I think they are related. These tests fail in all on other pre-commit runs and this patch makes multiple fixes into functionality covered by these tests, so it's very likely that these unexpected passes are caused by your changes.

Even if they are not related, we should remove XFAIL to fix the test status.

@t4c1
Copy link
Contributor Author

t4c1 commented Mar 22, 2022

Yep, I did that. It is just that the command to run the tests from specific tests suite PR does not work when I comment it.

@bader
Copy link
Contributor

bader commented Mar 22, 2022

@bader I don't think this worked.

@tfzhu, could you check why this comment #5849 (comment) haven't triggered PRs validation, please?

@bader
Copy link
Contributor

bader commented Mar 22, 2022

These unexpected passes on HIP do not seem to be related to my changes. I can reproduce them even with sycl branch.

I think they are related. These tests fail in all on other pre-commit runs and this patch makes multiple fixes into functionality covered by these tests, so it's very likely that these unexpected passes are caused by your changes.

Even if they are not related, we should remove XFAIL to fix the test status.

Hm... I just found the same results in pre-commit for #5782 - https://github.com/intel/llvm/runs/5631254024?check_suite_focus=true. Interesting...

@denis-kabanov
Copy link
Contributor

@t4c1, looks like your commit 0c113e0 does not contain changes from syclos 5430.

@t4c1
Copy link
Contributor Author

t4c1 commented Mar 28, 2022

I think timeouts for L0 tests are likely unrelated to changes in this PR.

@t4c1 t4c1 requested a review from bader March 29, 2022 06:40
@bader
Copy link
Contributor

bader commented Mar 29, 2022

/verify with intel/llvm-test-suite#929

@t4c1 t4c1 requested a review from bader March 30, 2022 07:20
@bader
Copy link
Contributor

bader commented Mar 30, 2022

@t4c1, could you take a look at test results on Windows, please?

ptxas fatal : Unresolved extern function '_Z22__spirv_GroupAsyncCopyjPU3AS3Dv2_aPU3AS1KS_yy9ocl_event'

Are you able to reproduce this failure?

@bader
Copy link
Contributor

bader commented Mar 31, 2022

Yep, I did that. It is just that the command to run the tests from specific tests suite PR does not work when I comment it.

@intel/llvm-external-read, this issue has been fixed and you should be able to tests PRs to llvm and llvm-test-suite together by adding a comment "/verify with ", where is either link to the PR from another repository.
Please, let me know if you have any issues with using this testing.

Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

@t4c1, could you take a look at test results on Windows, please?

ptxas fatal : Unresolved extern function '_Z22__spirv_GroupAsyncCopyjPU3AS3Dv2_aPU3AS1KS_yy9ocl_event'

Are you able to reproduce this failure?

@t4c1, I restarted to check if this some env. issue, but the same test failed again, so it looks like a regression. Please, take a look.

@t4c1
Copy link
Contributor Author

t4c1 commented Apr 1, 2022

Sorry for forgetting to respond. We believe this is an issue with the change to remangler and @AidanBeltonS is looking into it.

@t4c1 t4c1 requested a review from pvchupin as a code owner May 9, 2022 14:48
@t4c1 t4c1 marked this pull request as draft May 26, 2022 09:50
@github-actions github-actions bot added the Stale label Nov 23, 2022
steffenlarsen pushed a commit that referenced this pull request Dec 14, 2022
The diffs are quite hard to follow, but in an essence this patch brings:
* a new entry, implementing a generic address space for multiple
`__CLC_NVVM_ATOMIC_XYZ_IMPL`, where `XYZ` stands for `CAS`, `INDEC`,
`LOAD`, `MAX`, `MIN`, `STORE` and `SUB`,
* fixes the name of mangled function that the IMPL uses,
* the rest is just formatting to 80 chars.

This patch supersedes: #5849 but it
requires the fixes to the remangler from:
#7220

Fixes: #7658
@jchlanda
Copy link
Contributor

This can be closed now that #7391 is in, right @t4c1 ?

@t4c1
Copy link
Contributor Author

t4c1 commented Dec 14, 2022

Yes, I think so.

@t4c1 t4c1 closed this Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants