Skip to content

Commit

Permalink
Merge pull request #41 from MoseleyBioinformaticsLab/docs
Browse files Browse the repository at this point in the history
Updates documentation
  • Loading branch information
erikhuck authored May 20, 2024
2 parents 7f33138 + c98d3b1 commit 6e0f450
Show file tree
Hide file tree
Showing 6 changed files with 944 additions and 314 deletions.
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ gpu_tracker
###########
Description
-----------
The ``gpu_tracker`` package provides a ``Tracker`` class and a commandline-interface that tracks (profiles) the usage of compute time, CPU usage, maximum RAM, and maximum GPU RAM.
The ``gpu_tracker`` package provides a ``Tracker`` class and a commandline-interface that tracks (profiles) the usage of compute time, CPU utilization, maximum RAM, and maximum GPU RAM.
The compute time is a measurement of the real time taken by the task as opposed to the CPU-utilization time.
The GPU tracking is for Nvidia GPUs and uses the ``nvidia-smi`` command, assuming the Nvidia drivers have been installed.
The GPU tracking is for Nvidia GPUs and uses the ``nvidia-smi`` command. If the Nvidia drivers have not been installed, then the max GPU RAM is not tracked and measurements are reported as 0.
Computational resources are tracked throughout the duration of a context manager or the duration of explicit calls to the ``start()`` and ``stop()`` methods of the ``Tracker`` class.
The ``gpu-tracker`` command-line interface alternatively tracks the computational-resource-usage of an arbitrary shell command.

**NOTE: The tracking occurs in a separate process. To maximize the accuracy of the reported resource usage, you may want to have a core available solely for the tracking process e.g. if your job uses 3 workers, you may want to allocate 4 cores.**

Documentation
-------------
The complete documentation for the ``gpu_tracker`` package, including tutorials, can be found `here <https://moseleybioinformaticslab.github.io/gpu_tracker/>`__.
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ def setup(app):
# https://www.sphinx-doc.org/en/master/usage/extensions/todo.html#configuration

todo_include_todos = True
latex_elements = {'preamble': r'\usepackage{pmboxdraw}'}
6 changes: 6 additions & 0 deletions docs/notebook/example_module.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import torch

def example_function() -> torch.Tensor:
t1 = torch.tensor(list(range(10000000))).cuda()
t2 = torch.tensor(list(range(10000000))).cuda()
return t1 * t2
Loading

0 comments on commit 6e0f450

Please sign in to comment.