Skip to content

Commit

Permalink
Remove fp16 tan implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
testhound committed Nov 22, 2022
1 parent 25de1a3 commit b500268
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion numba/cuda/cudamath.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
@infer_global(math.radians)
@infer_global(math.sinh)
@infer_global(math.tanh)
@infer_global(math.tan)
class Math_unary(ConcreteTemplate):
cases = [
signature(types.float64, types.int64),
Expand All @@ -35,7 +36,6 @@ class Math_unary(ConcreteTemplate):

@infer_global(math.sin)
@infer_global(math.cos)
@infer_global(math.tan)
@infer_global(math.ceil)
@infer_global(math.floor)
@infer_global(math.sqrt)
Expand Down
8 changes: 0 additions & 8 deletions numba/cuda/mathimpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,6 @@ def fp16_cos(x):
return context.compile_internal(builder, fp16_cos, sig, args)


@lower(math.tan, types.float16)
def fp16_tan_impl(context, builder, sig, args):
def fp16_tan(x):
return cuda.fp16.hdiv(cuda.fp16.hsin(x), cuda.fp16.hcos(x))

return context.compile_internal(builder, fp16_tan, sig, args)


@lower(math.log, types.float16)
def fp16_log_impl(context, builder, sig, args):
def fp16_log(x):
Expand Down
1 change: 0 additions & 1 deletion numba/cuda/tests/cudapy/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ def test_math_cos(self):
def test_math_fp16(self):
self.unary_template_float16(math_sin, np.sin)
self.unary_template_float16(math_cos, np.cos)
self.unary_template_float16(math_tan, np.tan)
self.unary_template_float16(math_exp, np.exp)
self.unary_template_float16(math_log, np.log, start=1)
self.unary_template_float16(math_log2, np.log2, start=1)
Expand Down

0 comments on commit b500268

Please sign in to comment.