From 31c1be053f5edfedfd7cfd85804a59db8eab4392 Mon Sep 17 00:00:00 2001 From: Guoshuai Zhao Date: Sun, 26 Nov 2023 18:20:47 +0800 Subject: [PATCH] revert some changes --- superbench/config/default.yaml | 2 +- superbench/executor/executor.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/superbench/config/default.yaml b/superbench/config/default.yaml index 2ea39ca6f..1a6af7dc5 100644 --- a/superbench/config/default.yaml +++ b/superbench/config/default.yaml @@ -3,7 +3,7 @@ version: v0.9 superbench: enable: null monitor: - enable: false + enable: true sample_duration: 1 sample_interval: 10 var: diff --git a/superbench/executor/executor.py b/superbench/executor/executor.py index 572efbe64..bfff5cb7c 100644 --- a/superbench/executor/executor.py +++ b/superbench/executor/executor.py @@ -218,11 +218,14 @@ def exec(self): monitor = None if self.__get_rank_id() == 0 and self._sb_monitor_config and self._sb_monitor_config.enable: - monitor = Monitor( - None, int(self._sb_monitor_config.sample_duration or 10), - int(self._sb_monitor_config.sample_interval or 1), self.__get_monitor_path(benchmark_name) - ) - monitor.start() + if self.__get_platform() is not Platform.CPU: + monitor = Monitor( + None, int(self._sb_monitor_config.sample_duration or 10), + int(self._sb_monitor_config.sample_interval or 1), self.__get_monitor_path(benchmark_name) + ) + monitor.start() + else: + logger.warning('Monitor can not support CPU platform.') benchmark_real_name = benchmark_name.split(':')[0] for framework in benchmark_config.frameworks or [Framework.NONE.value]: