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

CI: refactor and extend atomic tests #1772

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

psychocoderHPC
Copy link
Member

@psychocoderHPC psychocoderHPC commented Aug 3, 2022

clang CUDA is exposing atomic*_block() function signatures even if these can not be used by the selected architecture.
This leads to compile issues if clang is used as CUDA compiler.

Our tests cases have not checked all combinations of atomics, therefore the second commit refactors the atomic tests and fixes #1769:

  • test all hierarchies which can be used for atomics
  • extent test cases to test for equal, smaller, larger, and zero as left side operand
  • test calling atomic*() and atomicOp<*>()
  • split tests into multiple kernel to workaround clang (HIP) error: error: stack size limit exceeded (155632) in _ZN6alpaka16uniform_cuda_hip6detail20uniformCudaHipKernelINS_8ApiHipRtENS_22AccGpuUniformCudaHipRtIS3_St17integral_constantImLm1EEmEES6_m16AtomicTestKernelIS7_xvEJPbxEEEvNS_3VecIT1_T2_EET3_DpT4_

@psychocoderHPC
Copy link
Member Author

For an unknown reason, the OpenACC test shows access to invalid memory and HIP requires over 60 minutes to compile the atomic test.

using Op = alpaka::AtomicAdd;

template<typename... TArgs>
static ALPAKA_FN_ACC auto atomic(TArgs&&... args)
Copy link
Member Author

Choose a reason for hiding this comment

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

@jkelling found out that this variadic template usage is the root of the nvhpc error (invalid memory access)

@psychocoderHPC
Copy link
Member Author

The fix for atomics is already merged with #1773.
Still open is to extent the test and check if we still run into the issue that compiling tests takes ages.

@psychocoderHPC psychocoderHPC changed the title fix clang CUDA atomics and refactor atomic tests CIrefactor atomic tests Sep 8, 2023
@psychocoderHPC psychocoderHPC changed the title CIrefactor atomic tests CI: refactor and extend atomic tests Sep 8, 2023
fix alpaka-group#1769

- test all hierarchies which can be used for atomics
- extent test cases to test for equal, smaller, larger and zero as left
side operand
- test calling the atomic interface `atomic*()` and `atomicOp<*>()`
Clang for HIP as problems if we have all atomic tests within one kernel
and throws the compiler error: `error: stack size limit exceeded (155632) in _ZN6alpaka16uniform_cuda_hip6de`, therefore we split the tests into multiple kernel to workaround the issue.
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.

atomic Unit tests for Dec and Inc not check edge cases
1 participant