[video][cuda][beta] decoder nvtx annotations#1228
Open
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1228
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 3693a8f with merge base 5800d58 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
f7098c4 to
fcf9335
Compare
bad8aa0 to
c5659f5
Compare
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
Introduces
USE_NVTXCMake flag, which, if enabled, definesUSE_NVTXC++ preprocessor macro.The
USE_NVTXmacro defined whether NVTX annotations shold be added to thecuda:betainterface oftorchcodec. NVTX annotations facilitate reading and analyzing data collected by NSight profiler.Profile With Annotations (this PR)
Command line:
Profile (note NVTX annotations related to decoder instantiation and frames decoding):

Profile Without Annotations (before)
Same command line, profile (no NVTX annotations):

Note: used NSight 2026.1.1 to visualize both profiles
Test Plan
torchcodecbuild with NVTX annotations enabled via an environment variable:and verified CMake cache entry:
Used this build to produce profile with NVTX annotations.
torchcodecbuild with NVTX annotations enabled via an environment variable, but disabled by CMake whenENABLE_CUDAis not set:Observed the following message on build:
and the following entry in
CMakeCache.txt:torchcodecbuild with NVTX annotations not enabled explicitly, withENABLE_CUDA=1:and verified the CMake cache entry:
torchcodecbuild without any environment variables:and verified the CMake cache entry: