Skip to content

Commit

Permalink
remove timing
Browse files Browse the repository at this point in the history
  • Loading branch information
hkvision committed Dec 3, 2024
1 parent cb8a852 commit b62ae49
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions python/llm/src/ipex_llm/transformers/npu_models/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ def causal_lm_forward(
output_hidden_states: Optional[bool] = None,
return_dict: Optional[bool] = None,
) -> Union[Tuple, CausalLMOutputWithPast]:
start = time.perf_counter()
from .npu_llm_cpp import run_prefill_with_logits, run_decode_with_logits
if isinstance(input_ids[0], torch.Tensor):
input_list = input_ids[0].flatten().tolist()
Expand All @@ -449,9 +448,6 @@ def causal_lm_forward(
logits = run_prefill_with_logits(self.model_ptr, input_list, self.logits_buffer, self.vocab_size)
else:
logits = run_decode_with_logits(self.model_ptr, input_list[0], self.logits_buffer, self.vocab_size)
end = time.perf_counter()
overall = (end - start) * 1000
print("Overall time: ", overall)

return CausalLMOutputWithPast(
loss=None,
Expand Down

0 comments on commit b62ae49

Please sign in to comment.