Metadata-Version: 2.4
Name: gpu-proc
Version: 0.1.0
Summary: Explicit local GPU memory and compute stress process for scheduling and monitoring tests.
Author: gpu-proc maintainers
License-Expression: MIT
Keywords: gpu,cuda,stress-test,monitoring,pytorch,cupy
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: GPU :: NVIDIA CUDA
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tomli>=2; python_version < "3.11"
Provides-Extra: torch
Requires-Dist: torch>=2.1; extra == "torch"
Provides-Extra: cupy-cuda12
Requires-Dist: cupy-cuda12x>=13; extra == "cupy-cuda12"
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: twine>=5; extra == "dev"
Dynamic: license-file

# gpu-proc

`gpu-proc` is an explicit local GPU stress process for testing schedulers,
monitoring alerts, dashboards, and GPU capacity behavior on machines you are
authorized to use.

It can reserve a configurable fraction of one CUDA device's memory and keep the
device busy with repeated matrix multiplication. The default target is `0.95`
of GPU memory with a finite `60` second run.

Actual utilization reported by tools such as `nvidia-smi` depends on the GPU,
driver, backend, matrix size, and sampling window.

This package is intentionally not a daemon, not stealthy, and not persistent.
Run it only on hardware you own or have permission to test.

## Install

Install the package itself:

```bash
pip install gpu-proc
```

Install one backend:

```bash
pip install "gpu-proc[torch]"
```

or, for CUDA 12 CuPy environments:

```bash
pip install "gpu-proc[cupy-cuda12]"
```

You can also install the package from a local checkout:

```bash
pip install -e ".[torch,dev]"
```

## Quick start

Create a config file:

```bash
gpu-proc init-config
```

Run with explicit confirmation:

```bash
gpu-proc run --yes
```

Run from a specific config:

```bash
gpu-proc run --config ./gpu-proc.toml --yes
```

Check backend availability:

```bash
gpu-proc doctor
```

## Config

Default path:

```text
~/.config/gpu-proc/config.toml
```

Example:

```toml
backend = "auto"
device = 0
memory_fraction = 0.95
duration_seconds = 60
matrix_size = 4096
dtype = "float32"
chunk_mb = 256
reserve_mb = 256
sync_every = 16
progress_interval_seconds = 5
allow_indefinite = false
require_confirmation = true
```

Set `duration_seconds = 0` only with `allow_indefinite = true`; stop the process
with `Ctrl-C`.

## Build and publish

Prepare build tooling:

```bash
python -m pip install --upgrade build twine
```

Build distributions:

```bash
python -m build
```

Check artifacts:

```bash
python -m twine check dist/*
```

Upload to TestPyPI first:

```bash
python -m twine upload --repository testpypi dist/*
```

Then upload to PyPI:

```bash
python -m twine upload dist/*
```

Use a PyPI API token instead of an account password.
