original_docstring: Parse configuration values set via command line.
  
      Parameters
      ----------
      input_configs: list of str
          list of configurations provided via command line.
  
      Returns
      -------
      pass_context_configs: dict
          a dict containing key-value configs to be used in the PassContext.
      
docstring: Parse configuration values set via command line.
  Parameters
  
  list of str
  list of configurations provided via command line.
  
  Returns
  
  dict
  a dict containing key-value configs to be used in the PassContext.
docstring_tokens: Parse configuration values set via command line . Parameters list of str list of configurations provided via command line . Returns dict a dict containing key - value configs to be used in the PassContext .
code: def parse_configs(input_configs):
      """Parse configuration values set via command line.
  
      Parameters
      ----------
      input_configs: list of str
          list of configurations provided via command line.
  
      Returns
      -------
      pass_context_configs: dict
          a dict containing key-value configs to be used in the PassContext.
      """
      if not input_configs:
          return {}
  
      all_configs = tvm.ir.transform.PassContext.list_configs()
      supported_config_types = ("IntImm", "runtime.String")
      supported_configs = [
          name for name in all_configs.keys() if all_configs[name]["type"] in supported_config_types
      ]
  
      pass_context_configs = {}
  
      for config in input_configs:
          if not config:
              raise TVMCException(
                  f"Invalid format for configuration '{config}', use <config>=<value>"
              )
  
          # Each config is expected to be provided as "name=value"
          try:
              name, value = config.split("=")
              name = name.strip()
              value = value.strip()
          except ValueError:
              raise TVMCException(
                  f"Invalid format for configuration '{config}', use <config>=<value>"
              )
  
          if name not in all_configs:
              raise TVMCException(
                  f"Configuration '{name}' is not defined in TVM. "
                  f"These are the existing configurations: {', '.join(all_configs)}"
              )
  
          if name not in supported_configs:
              raise TVMCException(
                  f"Configuration '{name}' uses a data type not supported by TVMC. "
                  f"The following configurations are supported: {', '.join(supported_configs)}"
              )
  
          parsed_value = get_pass_config_value(name, value, all_configs[name]["type"])
          pass_context_configs[name] = parsed_value
  
      return pass_context_configs
code_tokens: def parse_configs ( input_configs ) : if not input_configs : return { } all_configs = tvm . ir . transform . PassContext . list_configs ( ) supported_config_types = ( "IntImm" , "runtime.String" ) supported_configs = [ name for name in all_configs . keys ( ) if all_configs [ name ] [ "type" ] in supported_config_types ] pass_context_configs = { } for config in input_configs : if not config : raise TVMCException ( f"Invalid format for configuration '{config}', use <config>=<value>" ) try : name , value = config . split ( "=" ) name = name . strip ( ) value = value . strip ( ) except ValueError : raise TVMCException ( f"Invalid format for configuration '{config}', use <config>=<value>" ) if name not in all_configs : raise TVMCException ( f"Configuration '{name}' is not defined in TVM. " f"These are the existing configurations: {', '.join(all_configs)}" ) if name not in supported_configs : raise TVMCException ( f"Configuration '{name}' uses a data type not supported by TVMC. " f"The following configurations are supported: {', '.join(supported_configs)}" ) parsed_value = get_pass_config_value ( name , value , all_configs [ name ] [ "type" ] ) pass_context_configs [ name ] = parsed_value return pass_context_configs
short_docstring: Parse configuration values set via command line.
short_docstring_tokens: Parse configuration values set via command line .
comment: """Parse configuration values set via command line.
  
      Parameters
      ----------
      input_configs: list of str
          list of configurations provided via command line.
  
      Returns
      -------
      pass_context_configs: dict
          a dict containing key-value configs to be used in the PassContext.
      """$SEP$# Each config is expected to be provided as "name=value"