Repository navigation
Don't format a tensor to build the autocast flag - #155
Open
PavelGuzenfeld wants to merge 1 commit into
Open
PavelGuzenfeld wants to merge 1 commit into
PavelGuzenfeld wants to merge 1 commit into
Conversation
get_autocast_params overwrites enabled for cuda and non-cuda alike, so str(f1_s) == "cuda" never mattered. It formatted the feature tensor and synced the device on every proj call.
Author
|
Also measured on a Jetson Orin (JetPack 6.2, torch 2.4.0, no fused-local-corr there so |
This branch has not been deployed
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.
str(f1_s) == "cuda"inDecoder.forwardformats the whole feature tensor on every proj call, and that syncs the device. The value never matters:get_autocast_paramsoverwritesenabledon both branches (True for cuda, False otherwise). PassingTruegives the same result without the print.Output is bitwise identical to main.
torch.equalon warp and certainty for the toronto and sacre_coeur demo pairs, fused-local-corr on and off.Timing on an RTX 3060 laptop, torch 2.11,
match()on the toronto pair, 30 runs after a 60 s warmup, main and this branch alternated in separate processes three times. With fused-local-corr: 959, 968, 974 ms on main vs 929, 919, 922 ms here. Without it: 1093 vs 1051 ms. So about 3-5%, only measured on that one GPU.