Skip to main content
Ctrl+K

tvm-ffi

Get Started

  • Quick Start
  • Stable C ABI

Guides

  • Export Functions and Classes
  • Dataclass-Style Reflection
  • Kernel Library Guide
  • Compiler Integration
  • CUBIN Launcher Guide
  • Python Guide
  • C++ Guide
  • Rust Guide

Concepts

  • ABI Overview
  • Any and AnyView
  • Containers
  • Object and Class
  • Tensor and DLPack
  • Function and Module
  • Exception Handling
  • Structural Equality and Hashing

Packaging

  • Python Packaging
  • Stub Generation
  • C++ Tooling

Reference

  • Python API
    • tvm_ffi.Object
    • tvm_ffi.Tensor
    • tvm_ffi.from_dlpack
    • tvm_ffi.Shape
    • tvm_ffi.dtype
    • tvm_ffi.Device
    • tvm_ffi.DLDeviceType
    • tvm_ffi.device
    • tvm_ffi.Function
    • tvm_ffi.Module
    • tvm_ffi.system_lib
    • tvm_ffi.load_module
    • tvm_ffi.Array
    • tvm_ffi.Map
    • tvm_ffi.register_error
    • tvm_ffi.register_object
    • tvm_ffi.register_global_func
    • tvm_ffi.get_global_func
    • tvm_ffi.get_global_func_metadata
    • tvm_ffi.init_ffi_api
    • tvm_ffi.remove_global_func
    • tvm_ffi.StreamContext
    • tvm_ffi.use_torch_stream
    • tvm_ffi.use_raw_stream
    • tvm_ffi.get_raw_stream
    • tvm_ffi.cpp.load_inline
    • tvm_ffi.cpp.build_inline
    • tvm_ffi.cpp.load
    • tvm_ffi.cpp.build
    • tvm_ffi.libinfo.load_lib_module
    • tvm_ffi.cpp.nvrtc.nvrtc_compile
    • tvm_ffi.serialization.from_json_graph_str
    • tvm_ffi.serialization.to_json_graph_str
    • tvm_ffi.access_path.AccessKind
    • tvm_ffi.access_path.AccessPath
    • tvm_ffi.access_path.AccessStep
    • tvm_ffi.convert
    • tvm_ffi.ObjectConvertible
  • C++ API
  • Rust API

Developer Manual

  • Build from Source
  • Build This Doc Site
  • Reproduce CI/CD
  • Release Process
  • .rst

File function.h

Contents

  • Definition (tvm/ffi/function.h)
  • Includes
  • Included By
  • Namespaces
  • Classes
  • Functions
  • Defines

File function.h#

↰ Parent directory (tvm/ffi)

A managed function in the TVM FFI.

Contents

  • Definition (tvm/ffi/function.h)

  • Includes

  • Included By

  • Namespaces

  • Classes

  • Functions

  • Defines

Definition (tvm/ffi/function.h)#

  • Program Listing for File function.h

Includes#

  • functional

  • optional (File optional.h)

  • string (File string.h)

  • tuple (File tuple.h)

  • tvm/ffi/any.h (File any.h)

  • tvm/ffi/base_details.h (File base_details.h)

  • tvm/ffi/c_api.h (File c_api.h)

  • tvm/ffi/error.h (File error.h)

  • tvm/ffi/expected.h (File expected.h)

  • tvm/ffi/function_details.h

  • type_traits (File type_traits.h)

  • utility

  • vector

Included By#

  • File dtype.h

  • File module.h

  • File stl.h

  • File accessor.h

  • File creator.h

  • File init.h

  • File overload.h

  • File registry.h

  • File tvm_ffi.h

Namespaces#

  • Namespace tvm

  • Namespace tvm::ffi

Classes#

  • Class Function

  • Class FunctionObj

  • Class PackedArgs

  • Template Class TypedFunction

  • Template Class TypedFunction< R(Args…) >

Functions#

  • Function tvm::ffi::TypeKeyToIndex

Defines#

  • Define TVM_FFI_CHECK_SAFE_CALL

  • Define TVM_FFI_DLL_EXPORT_INCLUDE_METADATA

  • Define TVM_FFI_DLL_EXPORT_TYPED_FUNC

  • Define TVM_FFI_DLL_EXPORT_TYPED_FUNC_DOC

  • Define TVM_FFI_SAFE_CALL_BEGIN

  • Define TVM_FFI_SAFE_CALL_END

Contents
  • Definition (tvm/ffi/function.h)
  • Includes
  • Included By
  • Namespaces
  • Classes
  • Functions
  • Defines

By Apache TVM FFI contributors

Last updated on Mar 23, 2026.

Copyright © 2025, Apache Software Foundation
  • ASF Homepage
  • License
  • Sponsorship
  • Security
  • Thanks
  • Events
Apache TVM, Apache, the Apache feather, and the Apache TVM project logo are either trademarks or registered trademarks of the Apache Software Foundation.