-
Notifications
You must be signed in to change notification settings - Fork 795
[SYCL] Remove generic_type_lists.hpp
#15714
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,38 +24,19 @@ namespace ext { | |
| namespace oneapi { | ||
| namespace experimental { | ||
| namespace cuda { | ||
|
|
||
| namespace detail { | ||
| using ldg_vector_types = sycl::detail::type_list< | ||
| sycl::vec<char, 2>, sycl::vec<char, 3>, sycl::vec<char, 4>, | ||
| sycl::vec<signed char, 2>, sycl::vec<signed char, 3>, | ||
| sycl::vec<signed char, 4>, sycl::vec<short, 2>, sycl::vec<short, 3>, | ||
| sycl::vec<short, 4>, sycl::vec<int, 2>, sycl::vec<int, 3>, | ||
| sycl::vec<int, 4>, sycl::vec<long, 2>, sycl::vec<long, 3>, | ||
| sycl::vec<long, 4>, sycl::vec<long long, 2>, sycl::vec<long long, 3>, | ||
| sycl::vec<long long, 4>, sycl::vec<unsigned char, 2>, | ||
| sycl::vec<unsigned char, 3>, sycl::vec<unsigned char, 4>, | ||
| sycl::vec<unsigned short, 2>, sycl::vec<unsigned short, 3>, | ||
| sycl::vec<unsigned short, 4>, sycl::vec<unsigned int, 2>, | ||
| sycl::vec<unsigned int, 3>, sycl::vec<unsigned int, 4>, | ||
| sycl::vec<unsigned long, 2>, sycl::vec<unsigned long, 3>, | ||
| sycl::vec<unsigned long, 4>, sycl::vec<unsigned long long, 2>, | ||
| sycl::vec<unsigned long long, 3>, sycl::vec<unsigned long long, 4>, | ||
| sycl::vec<half, 2>, sycl::vec<half, 3>, sycl::vec<half, 4>, | ||
| sycl::vec<float, 2>, sycl::vec<float, 3>, sycl::vec<float, 4>, | ||
| sycl::vec<double, 2>, sycl::vec<double, 3>, sycl::vec<double, 4>>; | ||
|
|
||
| using ldg_types = | ||
| sycl::detail::tl_append<ldg_vector_types, | ||
| sycl::detail::gtl::scalar_floating_list, | ||
| sycl::detail::gtl::scalar_signed_integer_list, | ||
| sycl::detail::gtl::scalar_unsigned_integer_list>; | ||
| } // namespace detail | ||
| using namespace sycl::detail; | ||
| } | ||
|
|
||
| template <typename T> | ||
| 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, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this part isn't NFC in a sense that
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we leave a TODO reminding it on code?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| int, long, long long, unsigned char, unsigned short, | ||
| unsigned int, unsigned long, unsigned long long, | ||
| half, float, double> && | ||
| (std::is_same_v<detail::element_type_t<T>, T> || | ||
| (detail::is_vec_v<T> && detail::num_elements_v<T> >= 2 && | ||
| detail::num_elements_v<T> <= 4)), | ||
| T> | ||
| ldg(const T *ptr) { | ||
| #if defined(__SYCL_DEVICE_ONLY__) | ||
|
|
||
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.
given that you replace
is_contained_vwithcheck_type_in_vits implementation should probably be changed to theis_base_ofway of checking membership for best performanceThere 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.
Yeah, I'll look into that separately.