Fix swapped ReportStatistics timestamp args in PT2/AOTI backend - #203
Open
hg1112 wants to merge 1 commit into
Open
Fix swapped ReportStatistics timestamp args in PT2/AOTI backend#203hg1112 wants to merge 1 commit into
hg1112 wants to merge 1 commit into
Conversation
TRITONBACKEND_ModelInstanceReportStatistics expects timestamps in the order (exec_start_ns, compute_start_ns, compute_end_ns, exec_end_ns), but ModelInstanceState::ProcessRequests passed exec_end_ns before compute_start_ns/compute_end_ns. Triton core then interprets exec_end_ns as compute_input_end_ns, and the resulting subtraction underflows as an unsigned 64-bit value, reporting nv_inference_compute_infer_summary_us as an enormous bogus number (~18446744074s). Reorders the arguments to match the documented signature and the legacy PyTorch backend's call convention. Ref: triton-inference-server/server#8874
Greptile SummaryCorrects the PT2/AOTI per-request statistics call so timestamps follow the expected execution and computation sequence.
Confidence Score: 5/5The PR appears safe to merge because the corrected timestamp order is consistent with the established sibling statistics calls. The change only reorders same-typed timestamp arguments and now aligns the PT2/AOTI per-request call with both the legacy backend and adjacent batch-statistics reporting. Important Files Changed
Reviews (1): Last reviewed commit: "Fix swapped ReportStatistics timestamp a..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TRITONBACKEND_ModelInstanceReportStatisticsexpects timestamps in the order(exec_start_ns, compute_start_ns, compute_end_ns, exec_end_ns), butModelInstanceState::ProcessRequestsin the PT2/AOTI instance state passedexec_end_nsbeforecompute_start_ns/compute_end_ns. Triton core theninterprets
exec_end_nsascompute_input_end_ns, and the resultingsubtraction underflows as an unsigned 64-bit value, so
nv_inference_compute_infer_summary_usreports an enormous bogus number(~18446744074s) instead of the real compute latency.
This reorders the arguments to match the documented header signature and the
legacy (non-PT2) PyTorch backend's call convention, which already does this
correctly. The batch-level
TRITONBACKEND_ModelInstanceReportBatchStatisticscall a few lines below was already in the correct order, so no other changes
are needed.
Ref: triton-inference-server/server#8874
Test plan
pre-commit run(clang-format, codespell, etc.) passes on the changed fileTRITONBACKEND_ModelInstanceReportStatistics'sdeclaration in
triton-inference-server/core'stritonbackend.h