-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathstub_replacements_funcs.yaml
More file actions
19 lines (19 loc) · 1.51 KB
/
stub_replacements_funcs.yaml
File metadata and controls
19 lines (19 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# This file is used for post-processing of the pybind11-stubgen generated stubs.
# The file is a yaml file where:
# - the key is the funcion name, prefixed by "def "
# - the value is the entire replacement function definition, including indentation.
#
# Example reasons for adding something to this file:
# - adding additional possible types for a parameter, that pybind11-stubgen is not automatically
# adding, e.g. changing `int` to `int | np.in32 | np.int64`
# - changing `list[int]` to `tuple[int, ...]`, for a parameter
# - providing a concrete return type, in place of `...`
"def get_tensor_type": " def get_tensor_type(self, shape: tuple[int, ...], element_type: DataType) -> DataTypeCxx:"
"def make_get_element_expr": "def make_get_element_expr(arg0: Expr, arg1: tuple[int, ...], arg2: DebugInfo) -> ExprCxx:"
"def create_function": " def create_function(self, arg0: ...) -> Function:"
"def make_const_expr_bool": "def make_const_expr_bool(arg0: DataType, arg1: bool | np.bool_) -> ExprCxx:"
"def make_const_expr_fp": "def make_const_expr_fp(arg0: DataType, arg1: float | np.floating) -> ExprCxx:"
"def make_const_expr_int": "def make_const_expr_int(arg0: DataType, arg1: int | np.int32 | np.int64) -> ExprCxx:"
"def create_kernel": " def create_kernel(self, arg0: typing.Callable[[...], None], arg1: str, arg2: AutodiffMode) -> KernelCxx:"
"def make_launch_context": " def make_launch_context(self) -> KernelLaunchContext:"
"def set_arg_ndarray": " def set_arg_ndarray(self, arg0: tuple[int, ...], arg1: Ndarray) -> None:"