Skip to content

[SYCL][ESIMD] Make lsc_block_load/store try to use 64 bit blocks by default #8316

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

Merged
merged 27 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
78dbb91
Optimize the API by using 64 bit
fineg74 Feb 9, 2023
e7a6325
limit the functionality to default data size
fineg74 Feb 10, 2023
783f6bb
Fix test break
fineg74 Feb 12, 2023
7b6750b
Merge remote-tracking branch 'origin/sycl' into lscload64
fineg74 Feb 14, 2023
a2ea2c4
Add documentation and fix lint issue
fineg74 Feb 15, 2023
c5560db
Merge branch 'sycl' into lscload64
bader Feb 18, 2023
493fb56
Add more checks to validate data types provided to lsc API
fineg74 Feb 20, 2023
f85906a
Merge remote-tracking branch 'origin/sycl' into lscload64
fineg74 Feb 21, 2023
e23a642
Limit type conversions only
fineg74 Feb 21, 2023
0582e48
Revert "Fix test break"
fineg74 Feb 21, 2023
74546a6
Revert the changes
fineg74 Feb 21, 2023
dde14d6
Fix test break and update API documentation
fineg74 Feb 22, 2023
c912317
Merge remote-tracking branch 'origin/sycl' into lscload64
fineg74 Feb 22, 2023
e393e53
Fix typo
fineg74 Feb 23, 2023
8735d2e
Merge remote-tracking branch 'origin/sycl' into lscload64
fineg74 Feb 24, 2023
c4f7657
Introduce alignment tag
fineg74 Feb 24, 2023
8464242
Address PR comments
fineg74 Mar 1, 2023
e1dc4a3
Update documentation and fix a typo
fineg74 Mar 1, 2023
5670946
Address meeting comments
fineg74 Mar 1, 2023
9592cd7
Fix a build break
fineg74 Mar 1, 2023
c0bb320
Fix test break
fineg74 Mar 1, 2023
7080b1e
Simplify the API
fineg74 Mar 1, 2023
6d23b43
Address PR comments
fineg74 Mar 7, 2023
52c0f1d
Merge remote-tracking branch 'origin/sycl' into lscload64
fineg74 Mar 7, 2023
2d12a3a
Address PR comments
fineg74 Mar 8, 2023
0ee16ea
Address PR comments
fineg74 Mar 10, 2023
5962ce5
Merge remote-tracking branch 'origin/sycl' into lscload64
fineg74 Mar 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions sycl/include/sycl/ext/intel/esimd/detail/simd_obj_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ static inline constexpr bool is_simd_flag_type_v = is_simd_flag_type<T>::value;
namespace detail {

/// @cond ESIMD_DETAIL
/// \c dqword_element_aligned_tag type. Flag of this type should be used in load
/// and store operations when memory address is aligned by simd object's element
/// type or dword whatever is greater.
struct dqword_element_aligned_tag {
template <typename VT, typename ET = detail::element_type_t<VT>>
static constexpr unsigned alignment = alignof(ET) > 4 ? alignof(ET) : 4;
};

inline constexpr dqword_element_aligned_tag dqword_element_aligned = {};

// Functions to support efficient simd constructors - avoiding internal loop
// over elements.
Expand Down Expand Up @@ -881,6 +890,9 @@ class simd_obj_impl {

} // namespace detail

template <>
struct is_simd_flag_type<detail::dqword_element_aligned_tag> : std::true_type {
};
} // namespace ext::intel::esimd
} // __SYCL_INLINE_VER_NAMESPACE(_V1)
} // namespace sycl
12 changes: 12 additions & 0 deletions sycl/include/sycl/ext/intel/experimental/esimd/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ template <typename T, lsc_data_size DS> constexpr void check_lsc_data_size() {
static_assert(DS != lsc_data_size::default_size || sizeof(T) == 1 ||
sizeof(T) == 2 || sizeof(T) == 4 || sizeof(T) == 8,
"Unsupported data type");
static_assert(
DS == lsc_data_size::default_size ||
(sizeof(T) == 1 &&
(DS == lsc_data_size::u8 || DS == lsc_data_size::u8u32)) ||
(sizeof(T) == 2 &&
(DS == lsc_data_size::u16 || DS == lsc_data_size::u16u32 ||
DS == lsc_data_size::u16u32h)) ||
(sizeof(T) == 4 &&
(DS == lsc_data_size::u32 || DS == lsc_data_size::u8u32 ||
DS == lsc_data_size::u16u32 || DS == lsc_data_size::u16u32h)) ||
(sizeof(T) == 8 && DS == lsc_data_size::u64),
"Data type does not match data size");
}

template <lsc_vector_size VS> constexpr uint8_t to_int() {
Expand Down
Loading