neural_compressor.adaptor.torch_utils.symbolic_trace

Symbolic Trace for Torch Utils.

Module Contents

Functions

trace_and_fuse_sub_graph(model, prefix, is_qat)

Trace and fuse subgraph of the model.

symbolic_trace(model[, is_qat])

Trace the model.

neural_compressor.adaptor.torch_utils.symbolic_trace.trace_and_fuse_sub_graph(model, prefix, is_qat)[source]

Trace and fuse subgraph of the model.

Parameters:
  • model (object) – the input model.

  • prefix (str) – prefix of op name.

  • is_qat (bool) – if is qat.

Returns:

model (object).

neural_compressor.adaptor.torch_utils.symbolic_trace.symbolic_trace(model, is_qat=False)[source]

Trace the model.

Parameters:
  • model (object) – the input model.

  • is_qat (bool) – if is qat.

Returns:

traced_model (object).