Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Fix add and mtime
Browse files Browse the repository at this point in the history
Change-Id: I6bc0a140edb866f11ac26a3674d30ee8b80ef050
  • Loading branch information
b-sumner authored and adilad committed Mar 28, 2020
1 parent c214a58 commit 58abd89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ockl/src/gaaf.cl
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
extern void __llvm_amdgcn_global_atomic_fadd_p1f32_f32(__global float *, float) __asm("llvm.amdgcn.global.atomic.fadd.p1f32.f32");

void
__ockl_global_atomic_add_f32(__global float *p, float v)
__ockl_atomic_add_noret_f32(float *p, float v)
{
if (__oclc_ISA_version == 9008) {
__llvm_amdgcn_global_atomic_fadd_p1f32_f32(p, v);
if (__oclc_ISA_version == 9008 && !__ockl_is_local_addr(p) && !__ockl_is_private_addr(p)) {
__llvm_amdgcn_global_atomic_fadd_p1f32_f32((__global float *)p, v);
} else {
__global atomic_uint *t = (__global atomic_uint *)p;
atomic_uint *t = (atomic_uint *)p;
uint e = AL(t, memory_order_relaxed, memory_scope_device);
while (!AC(t, &e, AS_UINT(v + AS_FLOAT(e)), memory_order_relaxed, memory_order_relaxed, memory_scope_device))
;
Expand Down
2 changes: 1 addition & 1 deletion ockl/src/mtime.cl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "ockl.h"

ulong
__attribute__((target("s-memtime-inst"))) ulong
OCKL_MANGLE_U64(memtime)(void)
{
return __builtin_amdgcn_s_memtime();
Expand Down

0 comments on commit 58abd89

Please sign in to comment.