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

Timestamps #1

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
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
4 changes: 4 additions & 0 deletions src/converter/pytorch_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ def convert_json_to_protobuf_node(
if json_node.parent in protobuf_node_map:
protobuf_node.ctrl_deps.append(json_node.parent)
protobuf_node.duration_micros = int(json_node.exclusive_dur)
if json_node.ts is not None:
protobuf_node.start_time_micros = int(json_node.ts)
else:
protobuf_node.start_time_micros = 0

# Handle nodes covering more than 90% of the runtime
if "Optimizer.step" in json_node.name:
Expand Down