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

[alpaka] change assert with ALPAKA_ASSERT_OFFLOAD #219

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

antoniopetre
Copy link
Contributor

Some Alpaka kernels have the occupancy lower than the Native CUDA implementation (for example countFromVector kernel from HistoContainer).

I found out that the problem was related to the assert use in Alpaka. In Native CUDA, the assert is disabled by default, becoming enabled only if the macro GPU_DEBUG is set (this is not the case in Alpaka). I changed the assert from the Alpaka implementation with the macro ALPAKA_ASSERT_OFFLOAD from the Alpaka library (compatible from Alpaka 0.6.1). This macro enables assert only if ALPAKA_DEBUG_OFFLOAD_ASSUME_HOST is set. This change increased the occupancy for some kernels in Alpaka.

@makortel makortel added the alpaka label Sep 9, 2021
@makortel
Copy link
Collaborator

makortel commented Sep 9, 2021

Given that cudacompat has assert() enabled, should we include ALPAKA_DEBUG_OFFLOAD_ASSUME_HOST by default for serial and TBB backends?

@fwyzard

@makortel
Copy link
Collaborator

makortel commented Oct 7, 2021

I'm going to merge this as it is, and I opened an issue #228 to remind of the question in #219 (comment).

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

Successfully merging this pull request may close these issues.

None yet

2 participants