11# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22# SPDX-License-Identifier: BSD-2-Clause
33
4+ from numba .cuda import config
5+ import unittest
6+
7+ if config .ENABLE_CUDASIM :
8+ raise unittest .SkipTest ("Simulator does not support extending types" )
9+
410import inspect
511import math
612import os
1319import numba
1420from numba import cuda , njit
1521from numba .cuda import cgutils , jit , types
16- from numba .cuda .testing import CUDATestCase , skip_on_cudasim
22+ from numba .cuda .testing import CUDATestCase
1723from numba .cuda .cudadrv .driver import _have_nvjitlink
1824from numba .cuda .tests .support import TestCase
1925from numba .cuda .typing .templates import AttributeTemplate
@@ -203,7 +209,6 @@ def call_func1_unary(x, res):
203209 res [0 ] = func1 (x )
204210
205211
206- @skip_on_cudasim ("Extensions not supported in the simulator" )
207212class TestExtending (CUDATestCase ):
208213 def test_attributes (self ):
209214 @cuda .jit
@@ -263,7 +268,6 @@ def f(r, x):
263268 np .testing .assert_allclose (r , expected )
264269
265270
266- @skip_on_cudasim ("Extensions not supported in the simulator" )
267271class TestExtendingLinkage (CUDATestCase ):
268272 @unittest .skipUnless (TEST_BIN_DIR , "Necessary binaries are not available" )
269273 def test_extension_adds_linkable_code (self ):
@@ -369,7 +373,6 @@ def foo(r, x):
369373 np .testing .assert_equal (r , x * 2 )
370374
371375
372- @skip_on_cudasim ("Simulator does not support extending types" )
373376class TestLowLevelExtending (TestCase ):
374377 """
375378 Test the low-level two-tier extension API.
@@ -399,7 +402,6 @@ def test_type_callable_keeps_function(self):
399402 self .assertIsNotNone (type_func1 )
400403
401404
402- @skip_on_cudasim ("Simulator does not support extending types" )
403405class TestHighLevelExtending (TestCase ):
404406 """
405407 Test the high-level combined API.
@@ -673,7 +675,6 @@ def _assert_cache_stats(cfunc, expect_hit, expect_misses):
673675 raise AssertionError ("cache not used" )
674676
675677
676- @skip_on_cudasim ("Simulator does not support extending types" )
677678class TestIntrinsic (TestCase ):
678679 def test_void_return (self ):
679680 """
@@ -826,7 +827,6 @@ def codegen(context, builder, signature, args):
826827 self .assertEqual ("void_func docstring" , void_func .__doc__ )
827828
828829
829- @skip_on_cudasim ("Simulator does not support extending types" )
830830class TestRegisterJitable (unittest .TestCase ):
831831 def test_no_flags (self ):
832832 @register_jitable
@@ -846,7 +846,6 @@ def bar(x, y):
846846 self .assertEqual (x [0 ], 16 )
847847
848848
849- @skip_on_cudasim ("Simulator does not support extending types" )
850849class TestOverloadPreferLiteral (TestCase ):
851850 def test_overload (self ):
852851 def prefer_lit (x ):
@@ -902,7 +901,6 @@ def check_non_lit(x, res):
902901 self .assertEqual (c , 300 )
903902
904903
905- @skip_on_cudasim ("Simulator does not support extending types" )
906904class TestNumbaInternalOverloads (TestCase ):
907905 def test_signatures_match_overloaded_api (self ):
908906 # This is a "best-effort" test to try and ensure that Numba's internal
0 commit comments