Skip to content
This repository has been archived by the owner on Feb 20, 2025. It is now read-only.

Commit

Permalink
Merge branch 'main' into rd/recip_fp16b_acc
Browse files Browse the repository at this point in the history
  • Loading branch information
rtawfik01 authored Aug 7, 2024
2 parents 1a0243c + 3a492fb commit e76df6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llk_lib/llk_math_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ inline void _llk_math_pack_sync_init_() {

template <bool mail2math=true, bool mail2pack=true>
inline void _llk_math_get_tile_(std::uint32_t tile_index, std::uint32_t* p_tile) {
constexpr uint32_t wait_sem = (mail2math && mail2pack) ? (2) : (1);
while (semaphore_read(semaphore::UNPACK_OPERAND_SYNC) < wait_sem);
if constexpr (mail2math) {
*p_tile = mailbox_read(ThreadId::UnpackThreadId);
} else {
Expand Down
2 changes: 2 additions & 0 deletions llk_lib/llk_pack_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ inline void _llk_pack_dest_init_(const std::uint32_t face_r_dim = FACE_R_DIM, co

template <bool mail2math=true, bool mail2pack=true>
inline void _llk_pack_get_tile_(std::uint32_t tile_index, std::uint32_t *p_tile) {
constexpr uint32_t wait_sem = (mail2math && mail2pack) ? (2) : (1);
while (semaphore_read(semaphore::UNPACK_OPERAND_SYNC) < wait_sem);
if constexpr (mail2pack) {
*p_tile = mailbox_read(ThreadId::UnpackThreadId);
} else {
Expand Down

0 comments on commit e76df6c

Please sign in to comment.