Skip to content

Commit b0a0c4c

Browse files
committed
[lang] Fix math API exports and documentation
Signed-off-by: Qiqi Xiao <qiqix@nvidia.com>
1 parent 020d48d commit b0a0c4c

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

  • experimental/cuda-lang/src/cuda/lang/_stub

experimental/cuda-lang/src/cuda/lang/_stub/math.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,26 @@
99
@stub(static_eval_ok=True)
1010
def add(x, y, /, *, rounding_mode: RoundingMode | None = None,
1111
flush_to_zero: bool = False):
12-
"""Compute ``x + y``."""
12+
"""Compute ``x + y``.
13+
14+
Args:
15+
rounding_mode: The rounding mode.
16+
flush_to_zero: Whether to flush subnormal inputs and results to
17+
sign-preserving zero.
18+
"""
1319
...
1420

1521

1622
@stub(static_eval_ok=True)
1723
def sub(x, y, /, *, rounding_mode: RoundingMode | None = None,
1824
flush_to_zero: bool = False):
19-
"""Compute ``x - y``."""
25+
"""Compute ``x - y``.
26+
27+
Args:
28+
rounding_mode: The rounding mode.
29+
flush_to_zero: Whether to flush subnormal inputs and results to
30+
sign-preserving zero.
31+
"""
2032
...
2133

2234

@@ -360,12 +372,14 @@ def not_equal(x, y, /):
360372
"floordiv",
361373
"mod",
362374
"integer_remainder",
375+
"divmod",
363376
"negative",
364377
"ceil",
365378
"exp",
366379
"exp2",
367380
"sin",
368381
"cos",
382+
"sincos",
369383
"tan",
370384
"sinh",
371385
"cosh",
@@ -381,10 +395,6 @@ def not_equal(x, y, /):
381395
"isinf",
382396
"isfinite",
383397
"isnormal",
384-
"isnan",
385-
"isinf",
386-
"isfinite",
387-
"isnormal",
388398
"pow",
389399
"maximum",
390400
"minimum",

0 commit comments

Comments
 (0)