Skip to content

Conversation

@aelovikov-intel
Copy link
Contributor

We don't need to instantiate all the vec/marray types to implement generic_type_traits.hpp.

We don't need to instantiate all the `vec`/`marray` types to implement
`generic_type_traits.hpp`.
inline __SYCL_ALWAYS_INLINE std::enable_if_t<
sycl::detail::is_contained<
T, sycl::ext::oneapi::experimental::cuda::detail::ldg_types>::value,
detail::check_type_in_v<detail::element_type_t<T>, char, signed char, short,
Copy link
Contributor Author

@aelovikov-intel aelovikov-intel Oct 15, 2024

Choose a reason for hiding this comment

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

I think this part isn't NFC in a sense that gtl::scalar_floating_list on the left included bfloat16 but the code in this file hasn't been adjusted to actually handle it when it was added there. As such, the change here is actually good.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we leave a TODO reminding it on code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO, that's up to the @intel/llvm-reviewers-cuda to decide if any changes are necessary here.

Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

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

LGTM, just one nit.

inline __SYCL_ALWAYS_INLINE std::enable_if_t<
sycl::detail::is_contained<
T, sycl::ext::oneapi::experimental::cuda::detail::ldg_types>::value,
detail::check_type_in_v<detail::element_type_t<T>, char, signed char, short,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we leave a TODO reminding it on code?

template <typename T>
inline constexpr bool is_sgenfloat_v =
is_contained_v<T, gtl::scalar_floating_list>;
check_type_in_v<T, float, double, half, ext::oneapi::bfloat16>;
Copy link
Contributor

Choose a reason for hiding this comment

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

given that you replace is_contained_v with check_type_in_v its implementation should probably be changed to the is_base_of way of checking membership for best performance

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'll look into that separately.

@aelovikov-intel
Copy link
Contributor Author

@npmiller , @intel/llvm-reviewers-cuda , ping, you're the last approval needed.

Copy link
Contributor

@npmiller npmiller left a comment

Choose a reason for hiding this comment

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

CUDA changes LGTM

@aelovikov-intel aelovikov-intel merged commit 37c6766 into intel:sycl Oct 17, 2024
12 checks passed
@aelovikov-intel aelovikov-intel deleted the remove-generic-type-lists branch October 17, 2024 15:58
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.

4 participants