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

Avoid using __align__ in ROCm #2638

Merged
merged 1 commit into from
Nov 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions cupy/core/include/cupy/complex/complex.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ struct _select_greater_type
*
*/
template <typename T>
#if defined(__CUDACC__)
Copy link
Member

Choose a reason for hiding this comment

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

Can you also test __CUDACC_RDC__ here? It's a preparation for #2426.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think both __CUDACC__ and __CUDACC_RDC__ are set when built with --relocatable-device-code=true.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see! Yes, I can verify. Thanks @kmaehashi! This is not obvious from the documentation...☹️

struct __align__(sizeof(T)*2) complex {
#else
// ROCm (hipcc) does not support `__align__`
struct complex {
#endif
public:
/*! \p value_type is the type of \p complex's real and imaginary parts.
*/
Expand Down