| 555 | return self.static_output |
| 556 | |
| 557 | def model_times(self): |
| 558 | assert self.model_profile_enabled, "model profiling is not enabled" |
| 559 | model_times = self._model_times |
| 560 | if self._config.enable_cuda_graph and len(self._model_times) == 0: |
| 561 | raise ValueError("Model times are empty and cuda graph is enabled. If " |
| 562 | "this is a GPT-style model this combo is not supported. If this is a " |
| 563 | "BERT-style model this is a bug, please report it. " |
| 564 | f"Model type is: {type(self.module)}") |
| 565 | self._model_times = [] |
| 566 | return model_times |
| 567 | |
| 568 | def _module_match(self, module): |
| 569 | for policy in generic_policies: |