Skip to content

performance profiling #675

Answered by drbeh
hw-ju asked this question in Q&A
Apr 27, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @hw-ju,

Thanks for your question. They are not exactly the same but very similar. They both define the span of an event but there are two differences:

  1. with Range uses torch.cuda.nvtx and it only depends on the cuda version of PyTorch. However, with nvtx.annotate uses nvtx library directly, so it depends on nvtx being installed.
  2. with Range uses range_push and range_pop on the backend to define the context, so it inherit their limitations like they currently does not support to change the range color, while in with nvtx.annotate you can set the color in the input argument.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hw-ju
Comment options

Answer selected by drbeh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants