28#if defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__)
29 #define SHAMROCK_INTRISICS_GET_SMID_AVAILABLE
33 #if __has_builtin(__nvvm_read_ptx_sreg_smid)
34 ret = __nvvm_read_ptx_sreg_smid();
36 asm(
"mov.u32 %0, %%smid;" :
"=r"(ret));
43#elif defined(__SYCL_DEVICE_ONLY__) && defined(__AMDGCN__) && defined(__GFX9__)
44 #define SHAMROCK_INTRISICS_GET_SMID_AVAILABLE
48 asm volatile(
"s_getreg_b32 %0, hwreg(HW_REG_HW_ID, 8, 4)" :
"=s"(cu_id));
52#elif defined(__SYCL_DEVICE_ONLY__) && defined(__AMDGCN__) && defined(__GFX10__) \
54 #define SHAMROCK_INTRISICS_GET_SMID_AVAILABLE
57 asm volatile(
"s_getreg_b32 %0, hwreg(HW_REG_HW_ID1, 10, 4)" :
"=s"(cu_id));
61#elif defined(_IS_ACPP_SSCP)
62 #define SHAMROCK_INTRISICS_GET_SMID_AVAILABLE
67 namespace jit = sycl::AdaptiveCpp_jit;
69 #if __has_builtin(__nvvm_read_ptx_sreg_smid)
70 __acpp_if_target_sscp(
72 jit::reflect<jit::reflection_query::target_vendor_id>() == jit::vendor_id::nvidia,
74 ret = __nvvm_read_ptx_sreg_smid();
78 __acpp_if_target_sscp(
80 jit::reflect<jit::reflection_query::target_vendor_id>() == jit::vendor_id::nvidia,
82 asm(
"mov.u32 %0, %%smid;" :
"=r"(ret));
89#elif defined(__ACPP__) && ACPP_LIBKERNEL_IS_DEVICE_PASS_HOST && defined(linux)
constexpr const char * uint
Specific internal energy u.
std::uint32_t u32
32 bit unsigned integer
This file implement the GPU core timeline tool from A. Richermoz, F. Neyret 2024.
This file implement the GPU core timeline tool from A. Richermoz, F. Neyret 2024.
namespace for backends this one is named only sham since shambackends is too long to write
u32 get_sm_id()
Return the SM (Streaming Multiprocessor) ID of the calling thread, or equivalent if implemented.