File tree Expand file tree Collapse file tree 5 files changed +9
-1
lines changed Expand file tree Collapse file tree 5 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -193,10 +193,12 @@ def exp_ol(a):
193193
194194
195195if sys .version_info >= (3 , 11 ):
196+
196197 @overload (math .exp2 , target = "cuda" )
197198 def exp2_ol (a ):
198199 return _make_unary (a , hexp2 )
199200
201+
200202## Public aliases using Numba/Numpy-style type names
201203# Floating-point
202204float32_to_bfloat16 = float2bfloat16
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ class Math_unary_with_fp16(ConcreteTemplate):
5858 signature (types .float16 , types .float16 ),
5959 ]
6060
61+
6162if sys .version_info >= (3 , 11 ):
6263 Math_unary_with_fp16 = infer_global (math .exp2 )(Math_unary_with_fp16 )
6364
Original file line number Diff line number Diff line change 11# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22# SPDX-License-Identifier: BSD-2-Clause
3+
34import sys
45import numba .core .types as types
56from numba .cuda ._internal .cuda_fp16 import (
@@ -191,6 +192,7 @@ def exp_ol(a):
191192
192193
193194if sys .version_info >= (3 , 11 ):
195+
194196 @overload (math .exp2 , target = "cuda" )
195197 def exp2_ol (a ):
196198 return _make_unary (a , hexp2 )
Original file line number Diff line number Diff line change @@ -502,6 +502,7 @@ def test_math_exp(self):
502502 self .unary_template_float64 (math_exp , np .exp )
503503 self .unary_template_int64 (math_exp , np .exp )
504504 self .unary_template_uint64 (math_exp , np .exp )
505+
505506 # ---------------------------------------------------------------------------
506507 # test_math_exp2
507508
@@ -510,7 +511,7 @@ def test_math_exp2(self):
510511 self .unary_template_float32 (math_exp2 , np .exp2 )
511512 self .unary_template_float64 (math_exp2 , np .exp2 )
512513 self .unary_template_int64 (math_exp2 , np .exp2 )
513- self .unary_template_uint64 (math_exp2 , np .exp2 )
514+ self .unary_template_uint64 (math_exp2 , np .exp2 )
514515
515516 # ---------------------------------------------------------------------------
516517 # test_math_expm1
Original file line number Diff line number Diff line change @@ -44,9 +44,11 @@ class Math_unary(ConcreteTemplate):
4444 signature (types .float64 , types .float64 ),
4545 ]
4646
47+
4748if sys .version_info >= (3 , 11 ):
4849 Math_unary = infer_global (math .exp2 )(Math_unary )
4950
51+
5052@infer_global (math .atan2 )
5153class Math_atan2 (ConcreteTemplate ):
5254 cases = [
You can’t perform that action at this time.
0 commit comments