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
Some other fixes around cuda examples #2501
Conversation
{ | ||
return p_; | ||
} | ||
|
||
T* device_ptr() const HPX_NOEXCEPT |
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.
Should we add an overload for std::addressof()
as well?
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.
Nope. Even if yes, the signature of std::adressof()
(return type being T*
and argument being T&
) does not make things easy
@@ -160,10 +160,10 @@ namespace hpx { namespace components { namespace server | |||
|
|||
/// \brief Actions to create new objects | |||
template <typename Component> | |||
HPX_HOST_DEVICE naming::gid_type create_component(); | |||
naming::gid_type create_component(); | |||
|
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.
Shouldn't this make the HPX_HOST_DEVICE
conditional for NVCC only instead?
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.
@hkaiser Possible but need to do some cleaner workaround (in terms of host / device) around constructors/destructors/member functions of gid_type https://github.com/atrantan/hpx/blob/master/hpx/runtime/naming/name.hpp I may suggest to do it in a future work.
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.
I would like to avoid breaking NVCC builds just to fix the clang builds. Let's try to keep NVCC in working state as long as possible...
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.
It doesn't break NVCC builds that was working before. I may be wrong but only the partitioned_vector.cu was using components and for the moment it has always fail at compilation.
CMakeLists.txt
Outdated
@@ -969,6 +969,7 @@ endif() | |||
# CUDA features | |||
################################################################################ | |||
if(HPX_WITH_CUDA AND NOT HPX_WITH_CUDA_CLANG) | |||
hpx_add_target_compile_option(-DHPX_WITH_CUDA) |
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.
This is wrong. The actual problem lies here: https://github.com/STEllAR-GROUP/hpx/blob/master/hpx/config/compiler_specific.hpp#L75 which should test for HPX_HAVE_CUDA
instead.
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.
See commit 80277b9 that has been merged recently on master.
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.
I know, that's a bug on master.
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.
That LGTM now, thanks a lot!
Got the initial issue both with nvcc and clang because |
|
This patch tries to: