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

add __host__ __device__ to defaulted hip constructors #15

Merged
merged 2 commits into from
Jan 14, 2020
Merged

Conversation

trws
Copy link
Member

@trws trws commented Jan 14, 2020

The cuda model requires you not to have host/device notations on
defaulted constructors. Apparently hip requires them to generate the
constructors on the device. This commit adds a new macro so we can get
host/device only for HIP, and uses it to annotate defaulted constructors
on tuple_helper.

The cuda model requires you not to have host/device notations on
defaulted constructors.  Apparently hip requires them to generate the
constructors on the device.  This commit adds a new macro so we can get
host/device only for HIP, and uses it to annotate defaulted constructors
on tuple_helper.
@rhornung67
Copy link
Member

@trws FYI, this breaks the RAJA build with nvcc.

@trws
Copy link
Member Author

trws commented Jan 14, 2020

I can't explain why it appeared to work on nvcc last night, but I had the macro undefined in one case, this version appears to have fixed it. Sorry for the false start.

@rhornung67
Copy link
Member

@trws no worries. I'm testing the build now. Thanks for the quick response.

Copy link
Member

@rhornung67 rhornung67 left a comment

Choose a reason for hiding this comment

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

@trws RAJA builds with this now (I tested 2 versions of nvcc X 3 different host compilers -- just to be paranoid). Thanks!

@trws
Copy link
Member Author

trws commented Jan 14, 2020

Excellent, thanks for that @rhornung67. I'll merge and we can update raja to this version.

@trws trws merged commit 292f0bf into master Jan 14, 2020
@trws trws deleted the hip-constructors branch September 10, 2021 23:28
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.

3 participants