Skip to content

Conversation

@tqchen
Copy link
Member

@tqchen tqchen commented Aug 16, 2025

This PR formalizes original runtime::Module into ffi as ffi.Module and cleans the APIs around it.

The goal is to stablize the Module API as extra API that can benefit the overall ffi interactions. We also refactors the c++ code that depends on the Module.

@tqchen
Copy link
Member Author

tqchen commented Aug 16, 2025

Update note:

Make bytes serialization more self-contained across ffi

  • SaveBinary => SaveToBytes
  • LoadFromBinary =>LoadFromBytes
  • Global registration keys are updated accordingly
  • ffi.Module.load_from_bytes.<kind>
  • ffi.Module.load_from_bytes.<kind>
    Clarify API naming
  • Save => WriteToFile
  • type_ket =>kind (to avoid confusion with object system type key)

Update API convention

  • Remove sptr_to_self as we can obtain it in the Obj
  • Move most functions to ModuleObj

This PR formalizes original runtime::Module into ffi
as ffi.Module and cleans the APIs around it.

The goal is to stablize the Module API as extra API that can benefit the overall
ffi interactions. We also refactors the c++ code that depends on the Module.
@Hzfengsy Hzfengsy merged commit b8eb80b into main Aug 17, 2025
12 checks passed
mshr-h added a commit to mshr-h/tvm-relax-cpp-example that referenced this pull request Aug 23, 2025
tqchen added a commit to tqchen/tvm that referenced this pull request Sep 13, 2025
This PR formalizes original runtime::Module into ffi
as ffi.Module and cleans the APIs around it.

The goal is to stablize the Module API as extra API that can benefit the overall
ffi interactions. We also refactors the c++ code that depends on the Module.
tqchen added a commit to tqchen/tvm that referenced this pull request Sep 13, 2025
This PR formalizes original runtime::Module into ffi
as ffi.Module and cleans the APIs around it.

The goal is to stablize the Module API as extra API that can benefit the overall
ffi interactions. We also refactors the c++ code that depends on the Module.
tqchen added a commit to tqchen/tvm that referenced this pull request Sep 13, 2025
This PR formalizes original runtime::Module into ffi
as ffi.Module and cleans the APIs around it.

The goal is to stablize the Module API as extra API that can benefit the overall
ffi interactions. We also refactors the c++ code that depends on the Module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants