Skip to content

Commit 9f412b0

Browse files
authored
Merge pull request llvm#301 from AMD-Lightning-Internal/amd/dev/bsumner_amdeng/cherrypick_id_mask_fix
Amd/dev/bsumner amdeng/cherrypick id mask fix
2 parents 35a906e + 1efee63 commit 9f412b0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

amd/device-libs/ockl/src/hsaqs.cl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ update_mbox(const __global amd_signal_t *sig)
7272
if (mb) {
7373
uint id = sig->event_id;
7474
AS(mb, id, memory_order_release, memory_scope_all_svm_devices);
75-
__builtin_amdgcn_s_sendmsg(1 | (0 << 4), __builtin_amdgcn_readfirstlane(id) & 0xff);
75+
uint mid = id &
76+
(__oclc_ISA_version < 9000 ? 0xff :
77+
(__oclc_ISA_version < 10000 ? 0xffffff :
78+
(__oclc_ISA_version < 11000 ? 0x7fffff : 0xffffff)));
79+
__builtin_amdgcn_s_sendmsg(1 | (0 << 4), __builtin_amdgcn_readfirstlane(mid));
7680
}
7781
}
7882

offload/hostexec/src/hostexec_invoke.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
#include <stdint.h>
3+
#include "Platform.h"
34

45
#define GLOB_ATTR __attribute__((address_space(1)))
56
#define __static_inl static __attribute__((flatten, always_inline))

0 commit comments

Comments
 (0)