From d3040d59afe667195bc382d7215ab88069d65a13 Mon Sep 17 00:00:00 2001 From: Yevhenii Havrylko Date: Mon, 26 Feb 2024 15:43:30 -0500 Subject: [PATCH] Remove default value for atomic ref index --- .../_kernel_dpcpp_spirv_overloads/_atomic_ref_overloads.py | 4 ++-- numba_dpex/kernel_api/atomic_ref.py | 2 +- .../kernel_api_overloads/spv_overloads/test_atomic_fence.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/numba_dpex/experimental/_kernel_dpcpp_spirv_overloads/_atomic_ref_overloads.py b/numba_dpex/experimental/_kernel_dpcpp_spirv_overloads/_atomic_ref_overloads.py index fba13a0996..aab3f238ce 100644 --- a/numba_dpex/experimental/_kernel_dpcpp_spirv_overloads/_atomic_ref_overloads.py +++ b/numba_dpex/experimental/_kernel_dpcpp_spirv_overloads/_atomic_ref_overloads.py @@ -584,7 +584,7 @@ def _check_if_supported_ref(ref): ) def ol_atomic_ref( ref, - index=0, + index, memory_order=MemoryOrder.RELAXED, memory_scope=MemoryScope.DEVICE, address_space=AddressSpace.GLOBAL, @@ -655,7 +655,7 @@ def ol_atomic_ref( def ol_atomic_ref_ctor_impl( ref, - index=0, + index, memory_order=MemoryOrder.RELAXED, # pylint: disable=unused-argument memory_scope=MemoryScope.DEVICE, # pylint: disable=unused-argument address_space=AddressSpace.GLOBAL, # pylint: disable=unused-argument diff --git a/numba_dpex/kernel_api/atomic_ref.py b/numba_dpex/kernel_api/atomic_ref.py index 7d9e426aa1..9759cecf95 100644 --- a/numba_dpex/kernel_api/atomic_ref.py +++ b/numba_dpex/kernel_api/atomic_ref.py @@ -18,7 +18,7 @@ class AtomicRef: def __init__( # pylint: disable=too-many-arguments self, ref, - index=0, + index, memory_order=MemoryOrder.RELAXED, memory_scope=MemoryScope.DEVICE, address_space=AddressSpace.GLOBAL, diff --git a/numba_dpex/tests/experimental/kernel_api_overloads/spv_overloads/test_atomic_fence.py b/numba_dpex/tests/experimental/kernel_api_overloads/spv_overloads/test_atomic_fence.py index 111c64f6d1..8762803546 100644 --- a/numba_dpex/tests/experimental/kernel_api_overloads/spv_overloads/test_atomic_fence.py +++ b/numba_dpex/tests/experimental/kernel_api_overloads/spv_overloads/test_atomic_fence.py @@ -21,7 +21,7 @@ def test_atomic_fence(): def _kernel(item: Item, a, b): i = item.get_id(0) - bref = AtomicRef(b) + bref = AtomicRef(b, index=0) if i == 1: a[i] += 1