[bugfix]: fix VLM MFU miscomputation - #4057
Open
gtnv wants to merge 3 commits into
Open
Conversation
gtnv
requested review from
fegin,
felipemello1,
tianyu-l,
wconstab and
wwwjn
as code owners
August 3, 2026 21:31
|
The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:
Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows. |
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.
Closes #4009.
Currently, VLM TFLOPs and MFU are reported from decoder FLOPs alone, so vision-encoder work is missing.
this pr adds per-batch vision FLOPs from grid_thw for Qwen3.5 and Kimi2.5. Then accumulates them over each logging window and then adds them to the existing decoder estimate.
Testing
Ran VLM on 8xH100. Ran fixed-seed branch vs upstream runs which matched at every logged loss value. log_freq=3 run matched independent computed FLOPs at every logging bound (max rel error 7.3e-8).
some observations: tflops/mfu increased by the missing vision work. qwen mem peak was identical and tps stayed within bounds.
test plots