diff --git a/predtuner/torchapp.py b/predtuner/torchapp.py index b30968b8b186dcc4402b8202fa288a971b996db4..6bc700b17c634f3a3a3530f632ca800c93a3a1a3 100644 --- a/predtuner/torchapp.py +++ b/predtuner/torchapp.py @@ -124,6 +124,14 @@ class TorchApp(ModeledApp, abc.ABC): qos = self.combine_qos(np.array(qoses)) return 0.0, qos + def __repr__(self) -> str: + class_name = self.__class__.__name__ + module_class_name = type(self.module).__name__ + return ( + f'{class_name}"{self.name}"(module={module_class_name}, ' + f"num_op={len(self._op_knobs)}, num_knob={len(self.name_to_knob)})" + ) + @torch.no_grad() def _get_raw_output_valset(self, with_approxes: KnobsT): approxed = self._apply_knobs(with_approxes)