Skip to content

GPU Usage Profiler #37

Closed Answered by sourcecode369
ItsRajSingh asked this question in Q&A
Discussion options

You must be logged in to vote

The choice between using subprocess to run external commands (nvidia-smi), using a custom profiler, or leveraging PyTorch's built-in profiler (torch.autograd.profiler) for GPU usage monitoring depends on your specific requirements and the level of detail you need in the profiling results.

  1. subprocess for nvidia-smi:

    • Pros:
      • Simple and straightforward for obtaining high-level GPU utilization information.
      • Doesn't require modifications to your code.
    • Cons:
      • Limited to high-level metrics provided by nvidia-smi.
      • May introduce additional overhead due to the subprocess call.

    Use Case: Quick checks of overall GPU usage, especially if you need a general overview and don't need fine-grained de…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ItsRajSingh
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants