3
3
# SPDX-License-Identifier: Apache-2.0
4
4
5
5
"""
6
- Implements the SPIR-V overloads for the kernel_api.atomic_ref class methods.
6
+ Implements the SPIR-V overloads for the kernel_api.AtomicRef class methods.
7
7
"""
8
8
9
9
from llvmlite import ir as llvmir
15
15
from numba_dpex .core .targets .kernel_target import CC_SPIR_FUNC , LLVM_SPIRV_ARGS
16
16
from numba_dpex .core .types import USMNdArray
17
17
from numba_dpex .experimental .flag_enum import FlagEnum
18
- from numba_dpex .kernel_iface import (
18
+ from numba_dpex .kernel_api import (
19
19
AddressSpace ,
20
20
AtomicRef ,
21
21
MemoryOrder ,
@@ -363,7 +363,7 @@ def ol_atomic_ref(
363
363
address_space = AddressSpace .GLOBAL ,
364
364
):
365
365
"""Overload of the constructor for the class
366
- class:`numba_dpex.experimental.kernel_iface .AtomicRef`.
366
+ class:`numba_dpex.kernel_api .AtomicRef`.
367
367
368
368
Raises:
369
369
errors.TypingError: If the `ref` argument is not a UsmNdArray type.
@@ -441,8 +441,7 @@ def ol_atomic_ref_ctor_impl(
441
441
442
442
@overload_method (AtomicRefType , "fetch_add" , target = DPEX_KERNEL_EXP_TARGET_NAME )
443
443
def ol_fetch_add (atomic_ref , val ):
444
- """SPIR-V overload for
445
- :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.fetch_add`.
444
+ """SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_add`.
446
445
447
446
Generates the same LLVM IR instruction as dpcpp for the
448
447
`atomic_ref::fetch_add` function.
@@ -466,8 +465,7 @@ def ol_fetch_add_impl(atomic_ref, val):
466
465
467
466
@overload_method (AtomicRefType , "fetch_sub" , target = DPEX_KERNEL_EXP_TARGET_NAME )
468
467
def ol_fetch_sub (atomic_ref , val ):
469
- """SPIR-V overload for
470
- :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.fetch_sub`.
468
+ """SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_sub`.
471
469
472
470
Generates the same LLVM IR instruction as dpcpp for the
473
471
`atomic_ref::fetch_sub` function.
@@ -491,8 +489,7 @@ def ol_fetch_sub_impl(atomic_ref, val):
491
489
492
490
@overload_method (AtomicRefType , "fetch_min" , target = DPEX_KERNEL_EXP_TARGET_NAME )
493
491
def ol_fetch_min (atomic_ref , val ):
494
- """SPIR-V overload for
495
- :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.fetch_min`.
492
+ """SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_min`.
496
493
497
494
Generates the same LLVM IR instruction as dpcpp for the
498
495
`atomic_ref::fetch_min` function.
@@ -516,8 +513,7 @@ def ol_fetch_min_impl(atomic_ref, val):
516
513
517
514
@overload_method (AtomicRefType , "fetch_max" , target = DPEX_KERNEL_EXP_TARGET_NAME )
518
515
def ol_fetch_max (atomic_ref , val ):
519
- """SPIR-V overload for
520
- :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.fetch_max`.
516
+ """SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_max`.
521
517
522
518
Generates the same LLVM IR instruction as dpcpp for the
523
519
`atomic_ref::fetch_max` function.
@@ -541,8 +537,7 @@ def ol_fetch_max_impl(atomic_ref, val):
541
537
542
538
@overload_method (AtomicRefType , "fetch_and" , target = DPEX_KERNEL_EXP_TARGET_NAME )
543
539
def ol_fetch_and (atomic_ref , val ):
544
- """SPIR-V overload for
545
- :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.fetch_and`.
540
+ """SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_and`.
546
541
547
542
Generates the same LLVM IR instruction as dpcpp for the
548
543
`atomic_ref::fetch_and` function.
@@ -571,8 +566,7 @@ def ol_fetch_and_impl(atomic_ref, val):
571
566
572
567
@overload_method (AtomicRefType , "fetch_or" , target = DPEX_KERNEL_EXP_TARGET_NAME )
573
568
def ol_fetch_or (atomic_ref , val ):
574
- """SPIR-V overload for
575
- :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.fetch_or`.
569
+ """SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_or`.
576
570
577
571
Generates the same LLVM IR instruction as dpcpp for the
578
572
`atomic_ref::fetch_or` function.
@@ -601,8 +595,7 @@ def ol_fetch_or_impl(atomic_ref, val):
601
595
602
596
@overload_method (AtomicRefType , "fetch_xor" , target = DPEX_KERNEL_EXP_TARGET_NAME )
603
597
def ol_fetch_xor (atomic_ref , val ):
604
- """SPIR-V overload for
605
- :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.fetch_xor`.
598
+ """SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_xor`.
606
599
607
600
Generates the same LLVM IR instruction as dpcpp for the
608
601
`atomic_ref::fetch_xor` function.
@@ -631,8 +624,7 @@ def ol_fetch_xor_impl(atomic_ref, val):
631
624
632
625
@overload_method (AtomicRefType , "load" , target = DPEX_KERNEL_EXP_TARGET_NAME )
633
626
def ol_load (atomic_ref ): # pylint: disable=unused-argument
634
- """SPIR-V overload for
635
- :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.load`.
627
+ """SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.load`.
636
628
637
629
Generates the same LLVM IR instruction as dpcpp for the
638
630
`atomic_ref::load` function.
@@ -648,8 +640,7 @@ def ol_load_impl(atomic_ref):
648
640
649
641
@overload_method (AtomicRefType , "store" , target = DPEX_KERNEL_EXP_TARGET_NAME )
650
642
def ol_store (atomic_ref , val ):
651
- """SPIR-V overload for
652
- :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.store`.
643
+ """SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.store`.
653
644
654
645
Generates the same LLVM IR instruction as dpcpp for the
655
646
`atomic_ref::store` function.
@@ -674,8 +665,7 @@ def ol_store_impl(atomic_ref, val):
674
665
675
666
@overload_method (AtomicRefType , "exchange" , target = DPEX_KERNEL_EXP_TARGET_NAME )
676
667
def ol_exchange (atomic_ref , val ):
677
- """SPIR-V overload for
678
- :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.exchange`.
668
+ """SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.exchange`.
679
669
680
670
Generates the same LLVM IR instruction as dpcpp for the
681
671
`atomic_ref::exchange` function.
0 commit comments