-
Notifications
You must be signed in to change notification settings - Fork 365
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
replace AMREX_DEVICE_COMPILE with AMREX_IF_ON_DEVICE and AMREX_IF_ON_HOST #3591
Merged
WeiqunZhang
merged 31 commits into
AMReX-Codes:development
from
BenWibking:replace-cuda-arch
Nov 7, 2023
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
fbc67d5
use AMREX_IF_ON_DEVICE
BenWibking 02ee118
fix macro usage
BenWibking b281824
fix typos
BenWibking 209c960
use double parentheses for macro args
BenWibking a322241
workaround pragma omp atomic restrictions
BenWibking ce5c94d
convert CLZ functions to use macros
BenWibking 7c64ca8
update GPU doc
BenWibking 470c3cd
handle all cases in CLZ
BenWibking 615bffc
avoid static local device var
BenWibking 5471bc7
fix __CUDA_ARCH__ ifdefs
BenWibking aa02932
fix trailing whitespace
BenWibking f3bf52f
Merge branch 'development' into replace-cuda-arch
BenWibking 6466ad2
Update Src/Base/AMReX_GpuQualifiers.H
BenWibking 10ea8bb
fix CLZ on host
BenWibking e448b35
simpler pattern for SYCL_DEVICE/other device/host
BenWibking 009f66a
fix GpuRange SYCL_DEVICE/other device/host pattern
BenWibking 3668c36
fix Random SYCL_DEVICE/other device/host
BenWibking a89692e
avoid __CUDA_ARCH__ in Math
BenWibking 36ecb44
restore AMREX_EXPORT
BenWibking b98d4b3
remove trailing whitespace
BenWibking 9b7cd2c
Merge branch 'development' into replace-cuda-arch
BenWibking 7c2c9b6
fix remaining uses of __CUDA_ARCH__
BenWibking 34f9cbc
Simplify clz
WeiqunZhang 98f29ed
Need an extra declaration
WeiqunZhang 0ec2ff1
Fix default parameter
WeiqunZhang 1f1850f
Update Src/Base/AMReX_GpuAtomic.H
WeiqunZhang 891f167
Apply suggestions from code review
WeiqunZhang 8f2ef81
Update Src/Base/AMReX_RealVect.H
WeiqunZhang f0ae8bd
Revert back to use GNU extension if available
WeiqunZhang a43b5bb
Merge branch 'replace-cuda-arch' of github.com:BenWibking/amrex into …
WeiqunZhang 2946aef
Add back static, which somehow got lost
WeiqunZhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, nvc++ won't compile it with
static
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can file a bug report. I suspect it should pretty easy to write a small reproducer.
Since we need to wait for the inline bug to be fixed anyway, we probably don't need to worry about this issue for now. If we need to work around this for nvc++, we could use
if !defined(__NVHPC)
. If we don't usestatic
, the compiler might waste stack space unnecessarily.