gpu-burn
gpu-burn runs a configurable matrix-multiplication workload on one or more
NVIDIA GPUs using PaddlePaddle. It dynamically yields each GPU when another
process starts using a configured percentage of device memory, then resumes after
that GPU has remained idle for the configured period.
This project is not related to the CUDA/C++ project
wilicc/gpu-burn. It does not validate
calculation results and should not be used as a hardware fault or ECC diagnostic.
Requirements
- Linux and Python 3.10 or newer
- NVIDIA GPU and a compatible CUDA driver
- PaddlePaddle with CUDA support
The PyPI package explicitly depends on paddlepaddle-gpu>=2.6.2,<4.0.0.
PaddlePaddle publishes different packages and indexes for some CUDA versions, so
install the build recommended by the
official PaddlePaddle installation guide
when the default PyPI build does not match your CUDA environment.
Installation
Install from PyPI:
python -m pip install gpu-burn
For a CUDA-specific PaddlePaddle build, install PaddlePaddle first and then avoid letting pip replace it:
# Install the appropriate paddlepaddle-gpu build from the official Paddle index.
python -m pip install --no-deps gpu-burn
Install from a source checkout:
python -m pip install .
Usage
Run on all detected GPUs in the foreground at full utilization:
gpu-burn run
Select devices and target an approximate compute duty cycle:
gpu-burn run --devs 0,2-3 --util 60
Configure adaptive yielding with hysteresis. This pauses only the affected GPU when external compute processes use at least 5% of its total memory. Its worker restarts after usage remains at or below 2% for 5 continuous minutes:
gpu-burn run -d 0,2-3 -u 60 -P 5 -R 2 -i 5 -p 1
Run as a per-user background process:
gpu-burn start --gpus 2 --util 80
gpu-burn status
gpu-burn logs -f
gpu-burn stop
With no options, gpu-burn start selects every Paddle-visible GPU and uses:
16384x16384float16 matrix multiplication- 100% compute duty-cycle target
- pause at 5% external memory, resume at or below 2%
- 5 continuous idle minutes before restart
- 1-second monitoring interval
After the supervisor becomes ready, startup output includes the resolved GPU count, each device's running or paused state, worker PIDs, workload, adaptive policy, supervisor PID, and log path:
✓ gpu-burn is ready
gpu-burn 2.2.1 started
supervisor : pid 42000
devices : 2 selected, 2 running, 0 paused
gpu:0 : running (pid 42010)
gpu:1 : running (pid 42011)
workload : 16384x16384 float16, util 100%
adaptive : pause >= 5%, resume <= 2%, idle 5 min, poll 1s
log : /tmp/gpu-burn-1000/gpu-burn.log
On an interactive terminal, the first line is an animated spinner while Paddle
and NVIDIA devices are checked. Redirected output automatically uses plain text.
Set GPU_BURN_NO_SPINNER=1 to disable animation explicitly.
The main workload options are:
| Option | Meaning | Default |
|---|---|---|
-g, --gpus N |
Use the first N visible GPUs |
all |
-d, --devs LIST |
Device IDs/ranges such as 0,2-3 |
all |
-u, --util PERCENT |
Approximate compute duty cycle in (0, 100] |
100 |
-m, --size N |
Square matrix dimension | 16384 |
-t, --type TYPE |
float16 or float32 |
float16 |
-l, --log-int SECONDS |
Worker progress log interval | 30 |
-P, --pause PERCENT |
Pause at this external memory percentage | 5 |
-R, --resume PERCENT |
Start the idle timer at or below this percentage | 2 |
-i, --idle MINUTES |
Continuous idle minutes before restart | 5 |
-p, --poll SECONDS |
Memory polling interval | 1 |
--gpus and --devs are mutually exclusive. Lower utilization is
implemented by alternating synchronized matrix multiplication with idle time, so
the value observed by monitoring tools can vary with sampling intervals and GPU
power-management behavior.
The supervisor queries nvidia-smi compute applications and excludes its own
worker PIDs. Memory from other compute processes is summed per selected GPU and
divided by that GPU's total physical memory. At --pause, only that GPU's
worker is stopped, which releases its PaddlePaddle tensors and GPU memory. Once
usage reaches --resume or lower, it must remain there for --idle minutes
before a new worker starts. --resume must be lower than --pause; this
hysteresis prevents repeated stop/start cycles near one threshold. Display-only
contexts absent from NVIDIA's compute-app list are not considered.
Numeric and UUID-based CUDA_VISIBLE_DEVICES remapping is honored, so CLI device
IDs remain the same logical IDs that PaddlePaddle exposes.
State and cleanup
Only one managed instance is allowed per user. Runtime state and logs are stored
under $GPU_BURN_STATE_DIR, $XDG_RUNTIME_DIR/gpu-burn, or
/tmp/gpu-burn-$UID, in that order. gpu-burn stop --force sends SIGKILL if a
worker does not stop before the configured timeout.
Development
The PEP 517 build requirement uses a compatible lower bound
(setuptools>=77) instead of pinning one exact backend release. An exact pin
makes builds byte-for-byte easier to reproduce, but also forces every source
installer to download that precise release and can unnecessarily break offline
or constrained environments. This pure-Python project does not need wheel in
build-system.requires; setuptools implements the wheel build hook itself.
Release CI pins the user-facing build and twine tools separately.
python -m pip install --no-deps -e .
python -m pytest
python -m build
Run the opt-in adaptive lifecycle test on a real GPU:
GPU_BURN_TEST_DEVICE=0 python tests/real_gpu_dynamic.py
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gpu_burn-2.2.1.tar.gz.
File metadata
- Download URL: gpu_burn-2.2.1.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a9ca92e25236119c59845767aa0ad160ed9c05a6bca27c498968c07a7b68794
|
|
| MD5 |
38eaa6b1475031bee217ed3f56292938
|
|
| BLAKE2b-256 |
9b0c65fe5b56fd9288547d8b30a963c3e2790bf5a3a903171a023e6d2ac364f3
|
Provenance
The following attestation bundles were made for gpu_burn-2.2.1.tar.gz:
Publisher:
publish.yml on cangtianhuang/gpu-burn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpu_burn-2.2.1.tar.gz -
Subject digest:
4a9ca92e25236119c59845767aa0ad160ed9c05a6bca27c498968c07a7b68794 - Sigstore transparency entry: 2233186600
- Sigstore integration time:
-
Permalink:
cangtianhuang/gpu-burn@0c7944959970049aaf52124e6a00daeed2116196 -
Branch / Tag:
refs/tags/v2.2.1 - Owner: https://github.com/cangtianhuang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c7944959970049aaf52124e6a00daeed2116196 -
Trigger Event:
release
-
Statement type:
File details
Details for the file gpu_burn-2.2.1-py3-none-any.whl.
File metadata
- Download URL: gpu_burn-2.2.1-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65efa96b5072620520cfcd140415145684991da1eb60484487f08171aa01552b
|
|
| MD5 |
0b871446667fe5979746b523b471d163
|
|
| BLAKE2b-256 |
536337d753b540c9d375bbef02ba50195d93300fdf2ac8a3741ce2228495fd6c
|
Provenance
The following attestation bundles were made for gpu_burn-2.2.1-py3-none-any.whl:
Publisher:
publish.yml on cangtianhuang/gpu-burn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpu_burn-2.2.1-py3-none-any.whl -
Subject digest:
65efa96b5072620520cfcd140415145684991da1eb60484487f08171aa01552b - Sigstore transparency entry: 2233187220
- Sigstore integration time:
-
Permalink:
cangtianhuang/gpu-burn@0c7944959970049aaf52124e6a00daeed2116196 -
Branch / Tag:
refs/tags/v2.2.1 - Owner: https://github.com/cangtianhuang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c7944959970049aaf52124e6a00daeed2116196 -
Trigger Event:
release
-
Statement type: