Skip to content

Commit

Permalink
Fix for barrier call in global_barrier
Browse files Browse the repository at this point in the history
Due to known error, the barrier() call in global_barrier was not
properly inlined. Use internal builtin instead until the issue
is resolved.
  • Loading branch information
PawelJurek authored and igcbot committed Aug 26, 2024
1 parent 92dc998 commit 55afc37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IGC/BiFModule/Implementation/barrier.cl
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ uint __intel_get_local_size( void );
// Implementation of global_barrier using atomic instructions.
void __global_barrier_atomic()
{
barrier(CLK_GLOBAL_MEM_FENCE);
__intel_workgroup_barrier(Device, AcquireRelease | CrossWorkgroupMemory);

__global volatile int* syncBuffer = (__global volatile int*)__builtin_IB_get_sync_buffer();

Expand All @@ -335,7 +335,7 @@ void __global_barrier_atomic()
while (atomic_or(syncBuffer, 0) != 0) {}
}

barrier(CLK_GLOBAL_MEM_FENCE);
__intel_workgroup_barrier(Device, AcquireRelease | CrossWorkgroupMemory);
}

// Implementation of global_barrier without using atomic instructions except for fences.
Expand Down

0 comments on commit 55afc37

Please sign in to comment.