Metadata-Version: 2.4
Name: uhcr
Version: 3.1.0
Summary: Universal Hardware-Aware Compute Runtime — a modular, capability-driven execution stack
Author: Vishvesh Joshi
License: Apache-2.0
Project-URL: Homepage, https://vishveshjoshi89.github.io/UHCR
Project-URL: Repository, https://github.com/VishveshJoshi89/UHCR
Project-URL: Documentation, https://vishveshjoshi89.github.io/UHCR
Keywords: compiler,runtime,hardware,simd,avx,cuda,jit,tensor,cli
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Compilers
Classifier: Topic :: System :: Hardware
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-benchmark; extra == "dev"
Dynamic: license-file

# UHCR

A Python framework for hardware-optimized computation with JIT compilation across x86_64, AArch64, RISC-V, and CUDA.

<img src="https://img.shields.io/badge/python-3.10%2B-3776AB" alt="Python 3.10+">
<img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License: Apache-2.0">
<img src="https://img.shields.io/badge/tests-passing-brightgreen" alt="Tests: passing">
<img src="https://img.shields.io/badge/docs-Pages-purple" alt="Docs: GitHub Pages">
<img src="https://img.shields.io/badge/PyPI-v3.0.0-orange" alt="PyPI: v3.0.0">

[Full documentation](https://vishveshjoshi89.github.io/UHCR/)

## Install

```bash
pip install uhcr
```

## Quick Example

```python
import uhcr

@uhcr.jit(eager=True)
def compute(a, b):
    return (a + b) * 2
```

## Features

- **JIT Compilation** - Traces Python functions and compiles to native machine code
- **Multi-ISA Code Generation** - Targets x86_64 (AVX2), AArch64 (NEON), and RISC-V (RVV)
- **CUDA Backend** - GPU acceleration via PTX JIT for NVIDIA hardware
- **Optimization Pipeline** - Constant folding, dead code elimination, strength reduction, CSE
- **Hardware Detection** - Automatic CPUID, GPU probe, and NUMA topology discovery
- **Plugin System** - Extend with custom backends, kernels, and passes via TOML manifests
- **Tensor API** - High-level tensor operations dispatched to the optimal backend
- **Built-in Benchmarks** - Performance measurement suite for comparing execution paths

## Documentation

- [Architecture](https://vishveshjoshi89.github.io/UHCR/reference/architecture)
- [API Reference](https://vishveshjoshi89.github.io/UHCR/reference/api-reference)
- [JIT Guide](https://vishveshjoshi89.github.io/UHCR/guides/jit-guide)
- [Plugin Guide](https://vishveshjoshi89.github.io/UHCR/guides/plugin-guide)
- [Optimization Passes](https://vishveshjoshi89.github.io/UHCR/reference/optimization-passes)
- [Multi-ISA](https://vishveshjoshi89.github.io/UHCR/reference/multi-isa)
- [Benchmarks](https://vishveshjoshi89.github.io/UHCR/reference/benchmarks)
- [Contributing](https://vishveshjoshi89.github.io/UHCR/guides/contributing)

## Experimental Status

UHCR v3 includes the CLI tool (`uhcr`) and expanded hardware detection (RAM speed/type, CPU cache topology). These are now stable and production-ready as of v3.0.0.

## License

[Apache-2.0](LICENSE.md)
