Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apache/tvm-ffi
/ functions
Functions
5,333 in github.com/apache/tvm-ffi
⨍
Functions
5,333
◇
Types & classes
1,261
↳
Endpoints
2
↓ 1 callers
Function
_build_wrapper_code
Build the generated wrapper code string and runtime defaults dict. Returns ------- A tuple of (code_str, runtime_defaults) where code
python/tvm_ffi/utils/kwargs_wrapper.py:143
↓ 1 callers
Function
_check_cpp
(version_info: dict)
tests/lint/check_version.py:84
↓ 1 callers
Function
_check_rust
(version_info: dict)
tests/lint/check_version.py:122
↓ 1 callers
Function
_classify_field_type
Classify a resolved field type into a schema entry. Conservative: only returns None (leaf) when we are certain the type cannot contain a data
python/tvm_ffi/utils/unpack_dataclass.py:82
↓ 1 callers
Function
_collect_entry_declarations
Scan *cls.__dict__* for variant declarations. Returns ``(binders, python_entries)`` in declaration order: * *binders* — names annotated as `
python/tvm_ffi/dataclasses/enum.py:800
↓ 1 callers
Function
_collect_own_fields
Parse own annotations into :class:`Field` objects. - Skips ``ClassVar`` annotations. - Handles ``KW_ONLY`` sentinel. - Extracts ``Field``
python/tvm_ffi/dataclasses/py_class.py:165
↓ 1 callers
Function
_compile_dataclass_to_tuple_schema
Compile a DataclassToTupleSchema into an inline tuple expression. Parameters ---------- prefix The variable expression to unpack
python/tvm_ffi/utils/unpack_dataclass.py:114
↓ 1 callers
Function
_create_dlpack_exchange_api_capsule
Create a PyCapsule wrapping the DLPack exchange API pointer.
addons/torch_c_dlpack_ext/torch_c_dlpack_ext/core.py:28
↓ 1 callers
Method
_create_frame
Create a frame object from the filename, lineno, and func.
python/tvm_ffi/error.py:89
↓ 1 callers
Function
_cxx_backed_unknown_binder_error
Build a descriptive error for an unbindable bare ``ClassVar`` binder. A bare ``ClassVar[Cls]`` annotation on a cxx-backed enum means "bind to
python/tvm_ffi/dataclasses/enum.py:932
↓ 1 callers
Function
_decorator_default
(cls: _T)
python/tvm_ffi/registry.py:99
↓ 1 callers
Function
_defining_class
Find the first class in cls.__mro__ that defines attr_name in its __dict__.
docs/conf.py:308
↓ 1 callers
Function
_detect_gpu_backend
Auto-detect whether to use CUDA or HIP (ROCm). Returns 'hip' if ROCm/HIP is available, 'cuda' otherwise.
python/tvm_ffi/cpp/extension.py:44
↓ 1 callers
Function
_determine_backend_once
()
python/tvm_ffi/cpp/dtype.py:63
↓ 1 callers
Function
_discover_c_variants
Discover available C-only compiler variants.
addons/tvm_ffi_orcjit/tests/test_memory_manager.py:126
↓ 1 callers
Function
_discover_gcc_cpp_variants
Discover GCC C++ variants (emit R_X86_64_PC32 for __dso_handle).
addons/tvm_ffi_orcjit/tests/test_memory_manager.py:149
↓ 1 callers
Function
_discover_pie_cpp_variants
Discover PIE C++ variants built with -fpie. PIE objects force R_X86_64_PC32 (direct, ±2GB) for __dso_handle instead of R_X86_64_GOTPCRELX (GO
addons/tvm_ffi_orcjit/tests/test_memory_manager.py:154
↓ 1 callers
Function
_discover_variants
()
addons/tvm_ffi_orcjit/tests/test_basic.py:129
↓ 1 callers
Function
_ensure_attrs_dict
Return the live ``__ffi_enum_attrs__`` dict, registering it if absent.
python/tvm_ffi/dataclasses/enum.py:773
↓ 1 callers
Function
_ensure_entries_dict
Return the live ``__ffi_enum_entries__`` dict, registering it if absent.
python/tvm_ffi/dataclasses/enum.py:761
↓ 1 callers
Function
_ensure_value_entries_dict
Return the live ``__ffi_enum_value_entries__`` dict, registering it if absent.
python/tvm_ffi/dataclasses/enum.py:784
↓ 1 callers
Function
_escape_cpp_string_literal
Escape special characters for C++ string literals.
python/tvm_ffi/cpp/extension.py:625
↓ 1 callers
Function
_extra_cflags
()
addons/tvm_ffi_orcjit/tests/utils.py:54
↓ 1 callers
Function
_extra_cuda_cflags
()
addons/tvm_ffi_orcjit/tests/utils.py:61
↓ 1 callers
Function
_find_orc_rt_library
Find the bundled liborc_rt library in the same directory as the .so/.dll.
addons/tvm_ffi_orcjit/python/tvm_ffi_orcjit/session.py:29
↓ 1 callers
Function
_func_info_from_global_name
Construct a `FuncInfo` from a global function name.
python/tvm_ffi/stub/lib_state.py:112
↓ 1 callers
Method
_gen_ffi_init_from_fields
Generate ``__ffi_init__`` stub from field metadata for auto-generated init.
python/tvm_ffi/stub/utils.py:365
↓ 1 callers
Method
_gen_ffi_init_from_method
Render ``__ffi_init__`` TypeMethod as an instance method returning None.
python/tvm_ffi/stub/utils.py:291
↓ 1 callers
Method
_gen_init_from_fields
Generate ``__init__`` from init-eligible field metadata (auto-generated init).
python/tvm_ffi/stub/utils.py:357
↓ 1 callers
Function
_generate_ninja_build
Generate the content of build.ninja for building the module.
python/tvm_ffi/cpp/extension.py:338
↓ 1 callers
Function
_generate_ninja_build_windows
Generate the content of build.ninja for building the module on Windows.
python/tvm_ffi/utils/_build_optional_torch_c_dlpack.py:641
↓ 1 callers
Method
_get_cached_code_object
(self, filename: str, lineno: int, func: str)
python/tvm_ffi/error.py:67
↓ 1 callers
Function
_get_cuda_target
Get the CUDA target architecture flag.
python/tvm_ffi/cpp/extension.py:164
↓ 1 callers
Function
_get_rocm_target
Get the ROCm target architecture flags (--offload-arch=gfxXXXX).
python/tvm_ffi/cpp/extension.py:231
↓ 1 callers
Function
_hash
(obj: Any)
python/tvm_ffi/cpp/extension.py:83
↓ 1 callers
Function
_import_cls
Import and return the class object given its module and class name.
docs/conf.py:322
↓ 1 callers
Function
_install_deferred_init
Install a temporary ``__init__`` that completes registration on first call. Preserves a user-defined ``__init__`` if present in *cls.__dict__*;
python/tvm_ffi/dataclasses/py_class.py:558
↓ 1 callers
Function
_install_init
Install ``__init__`` from ``__ffi_init__`` TypeMethod or TypeAttrColumn. Skipped if the class body already defines ``__init__``. This ensures
python/tvm_ffi/registry.py:355
↓ 1 callers
Function
_install_payload_enum_behaviors
Install stdlib-like instance behavior for ``IntEnum`` / ``StrEnum``. Payload enums have two identities that plain ``Enum`` does not: the FFI
python/tvm_ffi/dataclasses/enum.py:214
↓ 1 callers
Function
_instantiate_cxx_backed
Construct a new variant of a cxx-backed enum without going through ``__init__``. C++-backed enums whose underlying type is registered with ``
python/tvm_ffi/dataclasses/enum.py:996
↓ 1 callers
Function
_instantiate_entry
Instantiate an enum entry and normalize construction errors.
python/tvm_ffi/dataclasses/enum.py:977
↓ 1 callers
Function
_is_config_mode
Check user is invoking the config CLI entry.
python/tvm_ffi/__init__.py:26
↓ 1 callers
Function
_is_known_leaf_type
Check if a type is definitely a leaf (no dataclass content or conversion needed). Note: list is NOT a leaf because it must be converted to a tupl
python/tvm_ffi/utils/unpack_dataclass.py:62
↓ 1 callers
Function
_is_method_marked
Return True when ``value`` is a callable marked by :func:`method`.
python/tvm_ffi/dataclasses/py_class.py:295
↓ 1 callers
Method
_is_prefix_of
(self, _1: AccessPath, /)
python/tvm_ffi/access_path.py:100
↓ 1 callers
Function
_load_invoke_n
()
tests/scripts/benchmark_pycallback.py:52
↓ 1 callers
Function
_make_copy
Build ``__copy__`` with ``__ffi_shallow_copy__`` resolved at install time.
python/tvm_ffi/_dunder.py:166
↓ 1 callers
Function
_make_deepcopy
Build ``__deepcopy__`` with ``DeepCopy`` resolved at install time.
python/tvm_ffi/_dunder.py:184
↓ 1 callers
Function
_make_init_signature
Build an ``inspect.Signature`` from reflection field metadata. Walks the parent chain (parent-first) to collect all ``init=True`` fields, reo
python/tvm_ffi/_dunder.py:107
↓ 1 callers
Function
_make_replace
Build ``__replace__`` with ``copy.copy`` resolved at install time.
python/tvm_ffi/_dunder.py:196
↓ 1 callers
Function
_make_temporary_init
( cls: type, type_info: Any, globalns: dict[str, Any], params: dict[str, Any] )
python/tvm_ffi/dataclasses/py_class.py:532
↓ 1 callers
Method
_map_item
(self, _1: Any, /)
python/tvm_ffi/access_path.py:96
↓ 1 callers
Method
_map_item_missing
(self, _1: Any, /)
python/tvm_ffi/access_path.py:99
↓ 1 callers
Function
_map_pep440_pre_to_semver
(pre: tuple[str, int] | None)
tests/lint/check_version.py:68
↓ 1 callers
Function
_on_error
(e: Exception)
python/tvm_ffi/stub/file_utils.py:233
↓ 1 callers
Function
_parse_args
()
python/tvm_ffi/stub/cli.py:254
↓ 1 callers
Function
_parse_backtrace
Parse the backtrace string into a list of (filename, lineno, func). Parameters ---------- backtrace The backtrace string. Re
python/tvm_ffi/error.py:31
↓ 1 callers
Function
_payload_enum_eq
Compare payload enum variants by payload and accept raw payloads. Two variants of the same enum class compare like their ``value`` fields,
python/tvm_ffi/dataclasses/enum.py:229
↓ 1 callers
Function
_platform_lib_filename
Return the platform-appropriate shared library filename for ``target_name``.
tests/python/test_libinfo.py:122
↓ 1 callers
Function
_prepare_stub_files
Move stub files into place if they do not already exist.
docs/conf.py:183
↓ 1 callers
Function
_raise_unresolved_forward_reference
Raise :class:`TypeError` listing the annotations that cannot be resolved.
python/tvm_ffi/dataclasses/py_class.py:514
↓ 1 callers
Function
_register_type_without_fields
Phase 1: allocate type index and register the type (always succeeds).
python/tvm_ffi/dataclasses/py_class.py:94
↓ 1 callers
Function
_resolve_entries
Materialise *binders* and *python_entries* into class-attribute singletons. Processing order matches declaration order: ``binders`` first (becaus
python/tvm_ffi/dataclasses/enum.py:855
↓ 1 callers
Method
_root
()
python/tvm_ffi/access_path.py:92
↓ 1 callers
Function
_run_build_on_linux_like
Build the module directly by invoking compiler commands (non-Windows only).
python/tvm_ffi/utils/_build_optional_torch_c_dlpack.py:592
↓ 1 callers
Function
_run_command_in_dev_prompt
Locates the Developer Command Prompt and runs a command within its environment.
python/tvm_ffi/cpp/extension.py:275
↓ 1 callers
Function
_run_tests
Load object file and run all test assertions. All JIT references (functions, lib, session) are released automatically when this function retu
addons/tvm_ffi_orcjit/examples/quick-start/run.py:71
↓ 1 callers
Function
_scan_cpp_macros
()
tests/lint/check_version.py:91
↓ 1 callers
Function
_set_match_args
Set ``cls.__match_args__`` from reflected fields. Mirrors stdlib :func:`dataclasses.dataclass` semantics: the tuple contains the names of pos
python/tvm_ffi/_dunder.py:217
↓ 1 callers
Function
_stage_1
( file: FileInfo, ty_map: dict[str, str], )
python/tvm_ffi/stub/cli.py:99
↓ 1 callers
Method
_to_steps
(self, /)
python/tvm_ffi/access_path.py:101
↓ 1 callers
Function
_torch_extension_device
Return the torch backend name used in the optional extension library name.
python/tvm_ffi/_optional_torch_c_dlpack.py:47
↓ 1 callers
Function
_torch_extension_device
Return the torch backend name used in the optional extension library name.
addons/torch_c_dlpack_ext/torch_c_dlpack_ext/core.py:42
↓ 1 callers
Function
_validate_method_name
Reject ``@method``-marked names that collide with reserved namespaces. Names in :data:`_FFI_TYPE_ATTR_NAMES` and Python-protocol dunders are
python/tvm_ffi/dataclasses/py_class.py:304
↓ 1 callers
Function
_validate_wrapper_args
Validate all input arguments for make_kwargs_wrapper. Parameters ---------- arg_names List of positional argument names. arg_
python/tvm_ffi/utils/kwargs_wrapper.py:79
↓ 1 callers
Function
_value_entries_dict
Return the live ``Dict[Any, Enum]`` payload-to-variant index, or None.
python/tvm_ffi/dataclasses/enum.py:742
↓ 1 callers
Function
_version_info
Return project version information using setuptools_scm.
tests/lint/check_version.py:45
↓ 1 callers
Function
_walk_recursive
()
python/tvm_ffi/stub/file_utils.py:240
↓ 1 callers
Function
add
(a: int, b: int)
tests/python/test_function.py:150
↓ 1 callers
Function
add_header
Add header to file.
tests/lint/check_asf_header.py:277
↓ 1 callers
Function
add_one_cpu
tests/python/test_build.cc:29
↓ 1 callers
Method
alloc_data
(&mut self, prototype: &DLTensor)
rust/tvm-ffi/src/collections/tensor.rs:327
↓ 1 callers
Method
append_traceback
Append a traceback to the given traceback. Parameters ---------- tb The traceback to append to. filename
python/tvm_ffi/error.py:98
↓ 1 callers
Function
apply
(*args: Any)
python/tvm_ffi/testing/_ffi_api.py:40
↓ 1 callers
Method
array_item_missing
Create an access path that indicate an array item is missing. Parameters ---------- index The index of the item t
python/tvm_ffi/access_path.py:201
↓ 1 callers
Method
as_container
(&self)
rust/tvm-ffi/src/collections/array.rs:166
↓ 1 callers
Method
asobject
(self)
tests/python/test_type_converter.py:531
↓ 1 callers
Method
at
! * \brief Read element from dict. * \param key The key * \return the corresponding element. */
include/tvm/ffi/container/dict.h:202
↓ 1 callers
Function
baseline_cupy_add
Run cupy.add with one element.
tests/scripts/benchmark_dlpack.py:110
↓ 1 callers
Function
baseline_numpy_add
Run numpy.add with one element.
tests/scripts/benchmark_dlpack.py:95
↓ 1 callers
Function
baseline_torch_add
Run torch.add with one element.
tests/scripts/benchmark_dlpack.py:71
↓ 1 callers
Function
bench_pycallback_from_dlpack
convert_func(cb): callback receives ffi.Tensor, does torch.from_dlpack(x) explicitly.
tests/scripts/benchmark_pycallback.py:75
↓ 1 callers
Function
bench_pycallback_tensor_cls_torch
convert_func(cb, tensor_cls=torch.Tensor): callback sees torch.Tensor directly.
tests/scripts/benchmark_pycallback.py:61
↓ 1 callers
Function
bench_torch_utils_to_dlpack
Measures overhead of running torch.utils.dlpack.to_dlpack.
tests/scripts/benchmark_dlpack.py:340
↓ 1 callers
Function
bench_tvm_ffi_nop_autodlpack_tuple
Measures overhead of running dlpack via auto convert by directly take torch.Tensor as inputs.
tests/scripts/benchmark_dlpack.py:242
↓ 1 callers
Function
benchmark_kwargs_wrapper
Benchmark kwargs wrapper with integer arguments and dataclass unpacking.
tests/scripts/benchmark_kwargs_wrapper.py:43
↓ 1 callers
Method
blocking_acquire
Wait until an exclusive lock can be acquired, with an optional timeout. Parameters ---------- timeout: float, optional
python/tvm_ffi/utils/lockfile.py:110
↓ 1 callers
Function
build
Compile and build a C/C++/CUDA module from source files. This function compiles the given C, C++, and/or CUDA source files into a shared library
python/tvm_ffi/cpp/extension.py:1149
↓ 1 callers
Function
build_base_cmd
(p_arg: Path, fix: bool)
tests/lint/clang_tidy_precommit.py:112
↓ 1 callers
Function
build_inline
Compile and build a C++/CUDA module from inline source code. This function compiles the given C++ and/or CUDA source code into a shared library o
python/tvm_ffi/cpp/extension.py:761
← previous
next →
801–900 of 5,333, ranked by callers