Skip to content

Commit 3028d82

Browse files
authored
[SYCL][ESIMD] Add support of 16 bit data for lsc_atomic_update and lsc_slm_atomic_update API (#9152)
1 parent 546bcb9 commit 3028d82

File tree

4 files changed

+675
-115
lines changed

4 files changed

+675
-115
lines changed

sycl/include/sycl/ext/intel/experimental/esimd/detail/memory_intrin.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -757,12 +757,8 @@ auto __esimd_emu_lsc_xatomic_offset_access_2(
757757
VecIdx += vectorIndexIncrement<N, _Transposed>()) {
758758

759759
if ((ByteDistance >= 0) && (ByteDistance < BufByteWidth)) {
760-
if constexpr (Op == __ESIMD_NS::native::lsc::atomic_op::cmpxchg) {
761-
Oldval[VecIdx] = __ESIMD_DNS::atomic_cmpxchg(
762-
(Ty *)(BaseAddr + ByteDistance), src0[VecIdx], src1[VecIdx]);
763-
} else if constexpr (Op ==
764-
__ESIMD_NS::native::lsc::atomic_op::fcmpxchg) {
765-
static_assert(__ESIMD_DNS::is_fp_type<Ty>::value);
760+
if constexpr (Op == __ESIMD_NS::native::lsc::atomic_op::cmpxchg ||
761+
Op == __ESIMD_NS::native::lsc::atomic_op::fcmpxchg) {
766762
Oldval[VecIdx] = __ESIMD_DNS::atomic_cmpxchg(
767763
(Ty *)(BaseAddr + ByteDistance), src0[VecIdx], src1[VecIdx]);
768764
}

0 commit comments

Comments
 (0)