Unverified Commit 08317481 authored by Yuting Jiang's avatar Yuting Jiang Committed by GitHub
Browse files

Benchmarks: Code Revision - add error return code for cublas microbenchmark (#90)

* add error return code for cublas micro benchmark
parent 40d7905e
......@@ -8,7 +8,7 @@
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 @@ def _preprocess(self):
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 @@ def _preprocess(self):
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment