Frontend Parser

The module of TVM workload extraction from models.

lorien.dialect.tvm_dial.frontend_parser.parse_model_config(model_desc: str, default_shape: Dict[str, Tuple[int, ...]]) Tuple[str, Dict[str, Tuple[int, ...]]]

A helper function to parse model file path and input shape.

Parameters
  • model_desc (str) -- Model description in YAML format.

  • default_shape (Tuple[int, ...]) -- The default shape for this model if shape is not specified in model_desc.

Returns

model_path_n_shape -- Model file path or name in the online model zoo.

Return type

Tuple[str, Dict[str, Tuple[int, ...]]]

lorien.dialect.tvm_dial.frontend_parser.register_extractor(framework: str) Callable

Register extractor for a target ML framework.

Parameters

framework (str) -- Framework's registration name.

Returns

reg -- A callable function for registration.

Return type

Callable