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

Fix parenthesis position in submdspan #368

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

tpadioleau
Copy link
Member

Closes #367

@tpadioleau
Copy link
Member Author

Btw, we have two ways to check if we have to workaround CTAD issues

  • #if defined(_MDSPAN_HAS_HIP) || defined(_MDSPAN_HAS_CUDA)
    MDSPAN_IMPL_STANDARD_NAMESPACE::detail::tuple<decltype(MDSPAN_IMPL_STANDARD_NAMESPACE::detail::stride_of(slices))...>{
    MDSPAN_IMPL_STANDARD_NAMESPACE::detail::stride_of(slices)...}).values),
    #else
  • #if defined(_MDSPAN_HAS_HIP) || \
    (defined(__NVCC__) && \
    (__CUDACC_VER_MAJOR__ * 100 + __CUDACC_VER_MINOR__ * 10) < 1120)
    MDSPAN_IMPL_STANDARD_NAMESPACE::detail::tuple<decltype(detail::stride_of(slices))...>(
    detail::stride_of(slices)...).values)),
    #else

Could we keep only one ?

@dalg24
Copy link
Member

dalg24 commented Dec 2, 2024

@nmm0 @crtrott plz review

@tpadioleau
Copy link
Member Author

tpadioleau commented Dec 2, 2024

I would go for the safer solution 1.

#if defined(_MDSPAN_HAS_HIP) || defined(_MDSPAN_HAS_CUDA)
MDSPAN_IMPL_STANDARD_NAMESPACE::detail::tuple<decltype(MDSPAN_IMPL_STANDARD_NAMESPACE::detail::stride_of(slices))...>{
MDSPAN_IMPL_STANDARD_NAMESPACE::detail::stride_of(slices)...}).values),
#else

Copy link
Member

@crtrott crtrott left a comment

Choose a reason for hiding this comment

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

Yeah Number one is fine

Copy link
Member

@crtrott crtrott left a comment

Choose a reason for hiding this comment

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

Can be done in a follow up unifying the guard.

@crtrott crtrott merged commit ff2551d into kokkos:stable Dec 2, 2024
15 checks passed
@tpadioleau tpadioleau deleted the fix-typo-submdspan branch December 3, 2024 09:28
@tpadioleau tpadioleau mentioned this pull request Dec 3, 2024
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.

Compilation error with submdspan in CUDA/HIP
4 participants