Add metadata information to the listing of PassContext configuration listing function (#8226)
* Rename PassContext::ListConfigNames() to PassContext::ListConfigs() and its Python counterpart tvm.ir.transform.PassContext.list_config_names -> list_configs() * Adjust PassContext::ListConfigs() to include also metadata (currently only including the data type) * Adjust unit tests
This commit is contained in:
@@ -121,9 +121,15 @@ class PassContext(tvm.runtime.Object):
|
||||
return _ffi_transform_api.GetCurrentPassContext()
|
||||
|
||||
@staticmethod
|
||||
def list_config_names():
|
||||
"""List all registered `PassContext` configuration names"""
|
||||
return list(_ffi_transform_api.ListConfigNames())
|
||||
def list_configs():
|
||||
"""List all registered `PassContext` configuration names and metadata.
|
||||
|
||||
Returns
|
||||
-------
|
||||
configs : Dict[str, Dict[str, str]]
|
||||
|
||||
"""
|
||||
return _ffi_transform_api.ListConfigs()
|
||||
|
||||
|
||||
@tvm._ffi.register_object("transform.Pass")
|
||||
|
||||
Reference in New Issue
Block a user