Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TextGeneration][Bug] Fix timer #1294

Merged
merged 4 commits into from
Oct 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/deepsparse/transformers/engines/nl_decoder_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,14 @@ def __call__(

:return: The generated token and corresponding logits
"""

timer = self.timer_manager.current
if not timer:
dsikka marked this conversation as resolved.
Show resolved Hide resolved
with self.timer_manager.new_timer_context(
total_inference=False
) as new_timer:
timer = new_timer

if kv_cache:
# if model has kv cache enabled, we need
# to add the kv cache state to the input
Expand Down
Loading