From 0831748167d518a76cf7c6b919e5be003766c37b Mon Sep 17 00:00:00 2001 From: Yuting Jiang Date: Tue, 1 Jun 2021 16:12:15 +0800 Subject: [PATCH] Benchmarks: Code Revision - add error return code for cublas microbenchmark (#90) * add error return code for cublas micro benchmark --- superbench/benchmarks/micro_benchmarks/cublas_function.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superbench/benchmarks/micro_benchmarks/cublas_function.py b/superbench/benchmarks/micro_benchmarks/cublas_function.py index a0475687..0941915d 100644 --- a/superbench/benchmarks/micro_benchmarks/cublas_function.py +++ b/superbench/benchmarks/micro_benchmarks/cublas_function.py @@ -8,7 +8,7 @@ import json import yaml from superbench.common.utils import logger -from superbench.benchmarks import Platform, BenchmarkRegistry +from superbench.benchmarks import Platform, BenchmarkRegistry, ReturnCode from superbench.benchmarks.micro_benchmarks import MicroBenchmarkWithInvoke @@ -241,7 +241,6 @@ class CublasBenchmark(MicroBenchmarkWithInvoke): if not self._args.config_json_str: for config_dict in self.__default_params_dict_list: config_json_str = "\'" + json.dumps(config_dict).replace(' ', '') + "\'" - print(config_json_str) complete_command = command + (' --config_json ') + config_json_str self._commands.append(complete_command) @@ -252,6 +251,7 @@ class CublasBenchmark(MicroBenchmarkWithInvoke): self._commands.append(complete_command) except BaseException as e: logger.error('Invalid input params - benchmark: {}, message: {}'.format(self._name, str(e))) + self._result.set_return_code(ReturnCode.INVALID_ARGUMENT) return False return True