Benchmarks: Code Revision - add error return code for cublas microbenchmark (#90)
* add error return code for cublas micro benchmark
This commit is contained in:
Родитель
40d7905e6b
Коммит
0831748167
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче