[API] Add type index query mode#640
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a query-only mode to TVMFFITypeGetOrAllocIndex by using a parent_type_index of -2. When this value is passed, the function queries the existing type index for the given type key without allocating a new one, returning -2 if the key is not registered. The changes include updates to the C API documentation, the implementation of QueryTypeIndex in TypeTable, and corresponding unit tests to verify the new behavior. No review comments were provided, so there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Reserve parent_type_index == -2 as a query-only TVMFFITypeGetOrAllocIndex mode that returns an existing registered index or -2 on miss without allocation. This is reserved for a future release update that may optionally query type indices at startup.
7643c21 to
9168b7c
Compare
8c16e95 to
cadff03
Compare
Summary
This query mode is reserved for a future release update that may optionally query type indices at startup.