tvm_tirx.script.ir_builder.parser_protocol.resolve_global_info_

tvm_tirx.script.ir_builder.parser_protocol.resolve_global_info_#

tvm_tirx.script.ir_builder.parser_protocol.resolve_global_info_(content)#

Resolve a named global-info selector in the current module context.

Parameters:

content (str) – A named-list selector such as “mesh[0]”. The shared implementation has no device-specific syntax; language variants may extend this hook.

Returns:

GlobalInfo – The exact registered metadata object, without a new source location.

Return type:

GlobalInfo

Notes

Resolution uses the nearest active native module frame. Missing context or malformed selectors raise ValueError; missing names and indices propagate KeyError and IndexError. Non-string inputs raise TypeError. tvm_tirx.script.ir_builder.resolve_global_info_args() invokes this hook only for string arguments and preserves concrete constructor inputs.

@resolve_global_info_args("metadata", resolver=resolve_global_info_)
def CustomType(metadata):
    return make_type(metadata)

CustomType(metadata="mesh[0]")