Skip to content

Commit

Permalink
Fix __builtin_amdgcn_s_sleep() not present on RustiCL (see preda#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
preda committed Dec 23, 2024
1 parent b947294 commit e52572e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cl/carryfused.cl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
#include "middle.cl"

void spin() {
#if AMDGPU
#if defined(__has_builtin) && __has_builtin(__builtin_amdgcn_s_sleep)
__builtin_amdgcn_s_sleep(0);
#elif HAS_ASM
__asm("s_sleep 0");
#else
// nothing: just spin
// on Nvidia: see if there's some brief sleep function
Expand Down

0 comments on commit e52572e

Please sign in to comment.