'PerfEngine' object has no attribute 'pre_compile_config' when the get_best_batch_size() implemented in the backend
jackzipu opened this issue · 1 comments
jackzipu commented
After implemented the get_best_batch_size()
to return a list of batch sizes, got the following error:
Traceback (most recent call last):
File "byte_mlperf/core/perf_engine.py", line 376, in <module>
engine.start_engine()
File "byte_mlperf/core/perf_engine.py", line 90, in start_engine
status, workload_report = self.single_workload_perf(self.workload)
File "byte_mlperf/core/perf_engine.py", line 155, in single_workload_perf
self.pre_compile_config['workload']['batch_sizes'] = best_batch_sizes
AttributeError: 'PerfEngine' object has no attribute 'pre_compile_config'
The following codes
best_batch_sizes = self.compile_backend.get_best_batch_size()
if isinstance(best_batch_sizes, list):
self.pre_compile_config['workload'][
'batch_sizes'] = best_batch_sizes
should be:
best_batch_sizes = self.compile_backend.get_best_batch_size()
if isinstance(best_batch_sizes, list):
pre_compile_config['workload'][
'batch_sizes'] = best_batch_sizes
JianzheXiao commented
Fixed