MCPcopy
hub / github.com/OpenPPL/ppq / ep_expr

Method ep_expr

ppq/quantization/optim/legacy.py:343–350  ·  view source on GitHub ↗
(operation: Operation)

Source from the content-addressed store, hash-verified

341 **kwargs) -> None:
342
343 def ep_expr(operation: Operation):
344 if not isinstance(operation, QuantableOperation): return False
345 if operation.type == 'Conv': return True
346 if operation.type in PPLCUDA_ACTIVATIONS:
347 upstream_ops = graph.get_upstream_operations(operation=operation)
348 if len(upstream_ops) == 0 and upstream_ops[0].type == 'Conv': return True
349 if upstream_ops[0] in merged: return True
350 return False
351
352 def retrospect(operation: QuantableOperation) -> QuantableOperation:
353 if not isinstance(operation, QuantableOperation): return None

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected