buffer_view.hpp Source File#
buffer_view.hpp
Go to the documentation of this file.
591 CK_TILE_DEVICE void set_raw(index_t i, index_t linear_offset, bool is_valid_element, const X& x)
968 (std::is_same_v<remove_cvref_t<T>, int8x16_t> && std::is_same_v<remove_cvref_t<X>, int8x16_t>) ||
970 (std::is_same_v<remove_cvref_t<T>, int8_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<int8_t, 16>>) ||
971 (std::is_same_v<remove_cvref_t<T>, int8_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<int8_t, 8>>) ||
972 (std::is_same_v<remove_cvref_t<T>, int8_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<int8_t, 4>>) ||
973 (std::is_same_v<remove_cvref_t<T>, int8_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<int8_t, 2>>) ||
974 (std::is_same_v<remove_cvref_t<T>, int8_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<int8_t, 1>>) ||
976 (std::is_same_v<remove_cvref_t<T>, pk_int4_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<pk_int4_t, 1>>) ||
977 (std::is_same_v<remove_cvref_t<T>, pk_int4_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<pk_int4_t, 2>>) ||
978 (std::is_same_v<remove_cvref_t<T>, pk_int4_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<pk_int4_t, 4>>) ||
979 (std::is_same_v<remove_cvref_t<T>, pk_int4_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<pk_int4_t, 8>>) ||
980 (std::is_same_v<remove_cvref_t<T>, pk_int4_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<pk_int4_t, 16>>) ||
981 (std::is_same_v<remove_cvref_t<T>, pk_int4x4_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<pk_int4_t, 4>>) ||
982 (std::is_same_v<remove_cvref_t<T>, pk_int4x8_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<pk_int4_t, 8>>) ||
983 (std::is_same_v<remove_cvref_t<T>, pk_int4x16_t> && std::is_same_v<remove_cvref_t<X>, thread_buffer<pk_int4_t, 16>>),
1110// FIXME: InvalidElementUseNumericalZeroValue and invalid_element_value_ should be a property of
1209 CK_TILE_DEVICE void update(index_t i, index_t linear_offset, bool is_valid_element, const X& x)
1262CK_TILE_HOST_DEVICE constexpr auto make_buffer_view(T* __restrict__ p, BufferSizeType buffer_size)
Definition tile/core/algorithm/cluster_descriptor.hpp:13
remove_cv_t< std::remove_reference_t< T > > remove_cvref_t
Definition type_traits.hpp:21
CK_TILE_DEVICE void atomic_add(X *p_dst, const X &x)
CK_TILE_DEVICE void amd_buffer_atomic_max(const thread_buffer< T, N > &src_thread_data, T *p_dst_wave, const index_t dst_thread_element_offset, const bool dst_thread_element_valid, const index_t dst_element_space_size)
Definition tile/core/arch/amd_buffer_addressing.hpp:2874
CK_TILE_DEVICE void atomic_add_g(T *p_dst, const thread_buffer< T, N > &x)
Definition tile/core/arch/generic_memory_space_atomic.hpp:358
constant< b > bool_constant
Definition tile/core/numeric/integral_constant.hpp:43
CK_TILE_DEVICE void amd_buffer_store(const thread_buffer< T, N > &src_thread_data, T *p_dst_wave, const index_t dst_thread_element_offset, const bool dst_thread_element_valid, const index_t dst_element_space_size)
Definition tile/core/arch/amd_buffer_addressing.hpp:2738
amd_buffer_coherence_enum
Definition tile/core/arch/amd_buffer_addressing.hpp:1404
@ coherence_default
Definition tile/core/arch/amd_buffer_addressing.hpp:1405
CK_TILE_DEVICE void amd_async_buffer_load_with_oob(CK_TILE_LDS_ADDR T *smem, const int32x4_t src_wave_buffer_resource, index_t src_thread_element_offset, index_t src_linear_element_offset, bool is_valid_element, bool_constant< oob_conditional_check >={})
Definition tile/core/arch/amd_buffer_addressing.hpp:2711
CK_TILE_DEVICE void amd_async_buffer_load_with_oob_raw(T *smem, const T *p_src_wave, index_t src_thread_element_offset, index_t src_linear_element_offset, index_t src_element_space_size, bool_constant< pre_nop >={})
Definition tile/core/arch/amd_buffer_addressing.hpp:2663
CK_TILE_DEVICE void amd_buffer_atomic_add_raw(const thread_buffer< T, N > &src_thread_data, T *p_dst_wave, const index_t dst_thread_element_offset, const index_t dst_linear_element_offset, const bool dst_thread_element_valid, const index_t dst_element_space_size, bool_constant< pre_nop >={})
Definition tile/core/arch/amd_buffer_addressing.hpp:2835
CK_TILE_HOST_DEVICE PY c_style_pointer_cast(PX p_x)
Definition type_traits.hpp:104
CK_TILE_DEVICE void amd_buffer_load_raw(thread_buffer< T, N > &dst, const T *p_src_wave, index_t src_thread_element_offset, index_t src_linear_element_offset, index_t src_element_space_size, index_t is_valid_element=0, bool_constant< pre_nop >={})
Definition tile/core/arch/amd_buffer_addressing.hpp:2605
CK_TILE_DEVICE thread_buffer< T, N > amd_buffer_load_invalid_element_return_zero(const T *p_src_wave, index_t src_thread_element_offset, bool src_thread_element_valid, index_t src_element_space_size)
Definition tile/core/arch/amd_buffer_addressing.hpp:2542
CK_TILE_DEVICE void amd_buffer_store_raw(const thread_buffer< T, N > &src_thread_data, T *p_dst_wave, const index_t dst_thread_element_offset, const index_t dst_linear_element_offset, const bool dst_thread_element_valid, const index_t dst_element_space_size)
Definition tile/core/arch/amd_buffer_addressing.hpp:2779
typename impl::ext_vector< T, N >::type ext_vector_t
Definition vector_type.hpp:84
CK_TILE_DEVICE int32x4_t make_wave_buffer_resource(const void *ptr, uint32_t size=0xffffffff, ForceSGPR={})
Definition tile/core/arch/amd_buffer_addressing.hpp:97
CK_TILE_DEVICE void amd_buffer_atomic_add(const thread_buffer< T, N > &src_thread_data, T *p_dst_wave, const index_t dst_thread_element_offset, const bool dst_thread_element_valid, const index_t dst_element_space_size)
Definition tile/core/arch/amd_buffer_addressing.hpp:2805
CK_TILE_DEVICE thread_buffer< T, N > amd_buffer_load_invalid_element_return_customized_value(const T *p_src_wave, index_t src_thread_element_offset, bool src_thread_element_valid, index_t src_element_space_size, T customized_value)
Definition tile/core/arch/amd_buffer_addressing.hpp:2580
CK_TILE_HOST_DEVICE constexpr auto make_buffer_view(T *__restrict__ p, BufferSizeType buffer_size)
Definition buffer_view.hpp:1262
CK_TILE_DEVICE void atomic_max_g(T *p_dst, const thread_buffer< T, N > &x)
Definition tile/core/arch/generic_memory_space_atomic.hpp:479
CK_TILE_HOST_DEVICE constexpr const char * address_space_to_string(address_space_enum addr_space)
Helper function to convert address space enum to string.
Definition arch.hpp:338
T * p_data_
Definition buffer_view.hpp:53
CK_TILE_HOST_DEVICE constexpr buffer_view()
Definition buffer_view.hpp:57
CK_TILE_DEVICE constexpr const T & operator[](index_t i) const
Definition buffer_view.hpp:83
CK_TILE_DEVICE void set(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:183
static CK_TILE_DEVICE constexpr address_space_enum get_address_space()
Definition buffer_view.hpp:76
static CK_TILE_DEVICE constexpr bool is_static_buffer()
Definition buffer_view.hpp:206
CK_TILE_DEVICE constexpr T & operator()(index_t i)
Definition buffer_view.hpp:87
CK_TILE_DEVICE constexpr auto transpose_get(index_t i, index_t linear_offset, bool is_valid_element, bool_constant< oob_conditional_check >={}) const
Definition buffer_view.hpp:144
CK_TILE_HOST_DEVICE void init_raw()
Definition buffer_view.hpp:74
static CK_TILE_DEVICE constexpr bool is_dynamic_buffer()
Definition buffer_view.hpp:209
CK_TILE_DEVICE constexpr auto get(index_t i, index_t linear_offset, bool is_valid_element, bool_constant< oob_conditional_check >={}) const
Definition buffer_view.hpp:96
CK_TILE_HOST_DEVICE constexpr buffer_view(T *__restrict__ p_data, BufferSizeType buffer_size)
Definition buffer_view.hpp:62
remove_cvref_t< T > invalid_element_value_
Definition buffer_view.hpp:55
CK_TILE_DEVICE void update(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:163
T type
Definition buffer_view.hpp:51
BufferSizeType buffer_size_
Definition buffer_view.hpp:54
CK_TILE_HOST_DEVICE constexpr buffer_view(T *__restrict__ p_data, BufferSizeType buffer_size, T invalid_element_value)
Definition buffer_view.hpp:67
int32x4_t cached_buf_res_
Definition buffer_view.hpp:233
CK_TILE_DEVICE constexpr auto transpose_get(index_t i, index_t linear_offset, bool is_valid_element, bool_constant< oob_conditional_check >={}) const
Definition buffer_view.hpp:370
BufferSizeType buffer_size_
Definition buffer_view.hpp:232
CK_TILE_HOST_DEVICE constexpr buffer_view(T *__restrict__ p_data, BufferSizeType buffer_size, T invalid_element_value)
Definition buffer_view.hpp:251
CK_TILE_HOST_DEVICE void init_raw()
Definition buffer_view.hpp:263
T * p_data_
Definition buffer_view.hpp:231
CK_TILE_DEVICE void update(index_t i, index_t linear_offset, bool is_valid_element, const X &x, bool_constant< oob_conditional_check >={})
Definition buffer_view.hpp:476
CK_TILE_DEVICE void update_raw(index_t i, index_t linear_offset, bool is_valid_element, const X &x, bool_constant< oob_conditional_check >={}, bool_constant< pre_nop >={})
Definition buffer_view.hpp:517
CK_TILE_HOST_DEVICE constexpr buffer_view()
Definition buffer_view.hpp:238
T type
Definition buffer_view.hpp:229
static CK_TILE_DEVICE constexpr address_space_enum get_address_space()
Definition buffer_view.hpp:268
CK_TILE_HOST_DEVICE constexpr buffer_view(T *__restrict__ p_data, BufferSizeType buffer_size)
Definition buffer_view.hpp:243
static CK_TILE_DEVICE constexpr bool is_dynamic_buffer()
Definition buffer_view.hpp:744
CK_TILE_DEVICE constexpr auto async_get_raw(remove_cvref_t< T > *smem, index_t i, index_t linear_offset, bool, bool_constant< pre_nop >={}) const
Definition buffer_view.hpp:449
static CK_TILE_DEVICE constexpr bool is_static_buffer()
Definition buffer_view.hpp:741
CK_TILE_DEVICE void atomic_add(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:613
CK_TILE_DEVICE constexpr auto get(index_t i, index_t linear_offset, bool is_valid_element, bool_constant< oob_conditional_check >={}) const
Definition buffer_view.hpp:288
CK_TILE_DEVICE constexpr auto async_get(CK_TILE_LDS_ADDR remove_cvref_t< T > *smem, index_t i, index_t linear_offset, bool is_valid_element, bool_constant< oob_conditional_check >={}) const
Definition buffer_view.hpp:416
CK_TILE_DEVICE constexpr auto get_raw(remove_cvref_t< X > &dst, index_t v_offset, index_t i_offset, bool is_valid_element, bool_constant< pre_nop >={}) const
Definition buffer_view.hpp:390
remove_cvref_t< T > invalid_element_value_
Definition buffer_view.hpp:234
CK_TILE_DEVICE constexpr T & operator()(index_t i)
Definition buffer_view.hpp:279
CK_TILE_DEVICE void set_raw(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:591
CK_TILE_DEVICE constexpr const T & operator[](index_t i) const
Definition buffer_view.hpp:275
CK_TILE_DEVICE void set(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:546
CK_TILE_DEVICE void atomic_max(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:708
CK_TILE_DEVICE void atomic_add_raw(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:677
static constexpr index_t PackedSize
Definition buffer_view.hpp:236
CK_TILE_DEVICE constexpr auto get_raw(remove_cvref_t< X > &dst, index_t v_offset, index_t i_offset, bool, bool_constant< pre_nop >={}) const
Definition buffer_view.hpp:856
CK_TILE_DEVICE constexpr const T & operator[](index_t i) const
Definition buffer_view.hpp:793
T * p_data_
Definition buffer_view.hpp:763
CK_TILE_DEVICE void set(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:932
CK_TILE_DEVICE constexpr auto transpose_get(index_t i, index_t linear_offset, bool is_valid_element) const
Definition buffer_view.hpp:870
CK_TILE_HOST_DEVICE constexpr buffer_view()
Definition buffer_view.hpp:767
BufferSizeType buffer_size_
Definition buffer_view.hpp:764
static CK_TILE_DEVICE constexpr bool is_dynamic_buffer()
Definition buffer_view.hpp:1102
CK_TILE_DEVICE constexpr auto get(index_t i, index_t linear_offset, bool is_valid_element, bool_constant< oob_conditional_check >={}) const
Definition buffer_view.hpp:806
CK_TILE_HOST_DEVICE constexpr buffer_view(T *__restrict__ p_data, BufferSizeType buffer_size, T invalid_element_value)
Definition buffer_view.hpp:777
CK_TILE_DEVICE constexpr T & operator()(index_t i)
Definition buffer_view.hpp:797
CK_TILE_HOST_DEVICE void init_raw()
Definition buffer_view.hpp:784
remove_cvref_t< T > invalid_element_value_
Definition buffer_view.hpp:765
CK_TILE_HOST_DEVICE constexpr buffer_view(T *__restrict__ p_data, BufferSizeType buffer_size)
Definition buffer_view.hpp:772
CK_TILE_DEVICE void update(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:912
T type
Definition buffer_view.hpp:761
static CK_TILE_DEVICE constexpr bool is_static_buffer()
Definition buffer_view.hpp:1099
static CK_TILE_DEVICE constexpr address_space_enum get_address_space()
Definition buffer_view.hpp:786
CK_TILE_DEVICE constexpr auto get(index_t i, index_t, bool is_valid_element, bool_constant< oob_conditional_check >={}) const
Definition buffer_view.hpp:1164
static CK_TILE_DEVICE constexpr address_space_enum get_address_space()
Definition buffer_view.hpp:1144
CK_TILE_HOST_DEVICE void init_raw()
Definition buffer_view.hpp:1142
CK_TILE_HOST_DEVICE constexpr buffer_view(T *__restrict__ p_data, BufferSizeType buffer_size)
Definition buffer_view.hpp:1130
T type
Definition buffer_view.hpp:1119
CK_TILE_DEVICE constexpr const T & operator[](index_t i) const
Definition buffer_view.hpp:1151
static CK_TILE_DEVICE constexpr bool is_dynamic_buffer()
Definition buffer_view.hpp:1255
CK_TILE_HOST_DEVICE constexpr buffer_view()
Definition buffer_view.hpp:1125
CK_TILE_DEVICE void set(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:1229
remove_cvref_t< T > invalid_element_value_
Definition buffer_view.hpp:1123
CK_TILE_DEVICE constexpr T & operator()(index_t i)
Definition buffer_view.hpp:1155
BufferSizeType buffer_size_
Definition buffer_view.hpp:1122
T * p_data_
Definition buffer_view.hpp:1121
CK_TILE_HOST_DEVICE constexpr buffer_view(T *__restrict__ p_data, BufferSizeType buffer_size, T invalid_element_value)
Definition buffer_view.hpp:1135
CK_TILE_DEVICE void update(index_t i, index_t linear_offset, bool is_valid_element, const X &x)
Definition buffer_view.hpp:1209
static CK_TILE_DEVICE constexpr bool is_static_buffer()
Definition buffer_view.hpp:1252
Definition buffer_view.hpp:35
Definition tile/core/numeric/numeric.hpp:81
Definition tile/core/numeric/numeric.hpp:18
Definition pk_int4.hpp:21
Definition tile/core/arch/amd_buffer_addressing.hpp:895
Definition tile/core/utility/debug.hpp:67
Definition vector_type.hpp:90