Skip to content

Commit

Permalink
Update driver.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Diptorup Deb committed Nov 2, 2023
1 parent a3174fc commit 0ed0f17
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,16 @@

import numba_dpex.experimental as nd_exp
from numba_dpex import Range, dpjit
from numba_dpex.core.kernel_interface.dpcpp_iface import (
AddressSpace,
AtomicRef,
MemoryOrder,
MemoryScope,
)
from numba_dpex.utils.constants import address_space


@nd_exp.kernel
def test_atomic_ref(a, b):
# i = get_global_id(0)
v = AtomicRef(
v = nd_exp.AtomicRef(
b,
MemoryOrder.relaxed,
MemoryScope.device,
AddressSpace.GLOBAL,
nd_exp.MemoryOrder.relaxed,
nd_exp.MemoryScope.device,
nd_exp.AddressSpace.GLOBAL,
)
v.fetch_add(a[0]) # a[i]

Expand Down

0 comments on commit 0ed0f17

Please sign in to comment.