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

Refactor workload tracking and message generation #72

Merged
merged 11 commits into from
Feb 7, 2025
Merged

Conversation

bengaineyarm
Copy link
Contributor

This reworks some of the state tracking, decoupling it from the timeline-layer specific data serialization.

This shouldn't change the serialized JSON data, but it is preparation work for moving to protobufs.

@bengaineyarm bengaineyarm force-pushed the protobufs branch 4 times, most recently from 82aa973 to 8642ac8 Compare February 5, 2025 15:00
…amic dispatch.

Switch to a variant based instruction, rather than using dynamic dispatch + enum as this is more type safe.

Remove the duplicated  object in command_buffer.
No need to carry around the extra state uncessarily.

This also makes clear from the type, rather than from the magic
tagID value that the renderpass is a continuation. This makes
refactoring to separate out the the workload as a data object
from operations on that data safer since they will not
need to propogate this magic knowledge forward.
…kloadMetadataEmitterVisitor.

This centralizes the construction of metadata payloads into one place,
decoupling the metadata format from the layer driver handler functions.
This is now moved into the centralized serializer for the layer driver in workload_metadata_builder and fully decouples
the state tracker from the timeline layer's data serialization
of JSON.

 * Uses "protobuf" C++ header only library for encoding the messages
   as they are simple and we want to avoid a larger dependency on
   libprotobuf and the necessary build-time changes to build
   or require protoc for host and libprotobuf for target.
into JSON objects that the viewer expects
The protocol supports multiple devices, as does the API
but historically we just assumed a single device.
Modify the state tracking in service_gpu_timeline.py so
that we collect frames and submits on a per-device
basis.
Renamed workload_metadata_builder to timeline_protobuf_encoder to better reflect what
it does
docs/updating_protobuf_files.md Outdated Show resolved Hide resolved
layer_gpu_timeline/source/device.hpp Outdated Show resolved Hide resolved
layer_gpu_timeline/source/timeline_protobuf_encoder.cpp Outdated Show resolved Hide resolved
layer_gpu_timeline/source/timeline_protobuf_encoder.hpp Outdated Show resolved Hide resolved
layer_gpu_timeline/timeline.proto Outdated Show resolved Hide resolved
@bengaineyarm bengaineyarm merged commit d9a1094 into main Feb 7, 2025
6 checks passed
@bengaineyarm bengaineyarm deleted the protobufs branch February 7, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants