Skip to content

Commit dfa3147

Browse files
authored
update (#10944)
1 parent 5973d6c commit dfa3147

File tree

1 file changed

+3
-0
lines changed
  • python/llm/dev/benchmark/all-in-one

1 file changed

+3
-0
lines changed

python/llm/dev/benchmark/all-in-one/run.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
sys.path.append(benchmark_util_path)
3434
from benchmark_util import BenchmarkWrapper
3535
from ipex_llm.utils.common.log4Error import invalidInputError
36+
from ipex_llm.utils.common import invalidInputError
3637

3738
LLAMA_IDS = ['meta-llama/Llama-2-7b-chat-hf','meta-llama/Llama-2-13b-chat-hf',
3839
'meta-llama/Llama-2-70b-chat-hf','decapoda-research/llama-7b-hf',
@@ -110,6 +111,8 @@ def run_model(repo_id, test_api, in_out_pairs, local_model_hub=None, warm_up=1,
110111
result = run_speculative_gpu(repo_id, local_model_hub, in_out_pairs, warm_up, num_trials, num_beams, batch_size)
111112
elif test_api == 'pipeline_parallel_gpu':
112113
result = run_pipeline_parallel_gpu(repo_id, local_model_hub, in_out_pairs, warm_up, num_trials, num_beams, low_bit, batch_size, cpu_embedding, fp16=use_fp16_torch_dtype, n_gpu=n_gpu)
114+
else:
115+
invalidInputError(False, "Unknown test_api " + test_api + ", please check your config.yaml.")
113116

114117
for in_out_pair in in_out_pairs:
115118
if result and result[in_out_pair]:

0 commit comments

Comments
 (0)