# AnswerDotAI/gpu.cpp

A lightweight library for portable low-level GPU computation using WebGPU.

Repository: https://github.com/AnswerDotAI/gpu.cpp
Canonical: https://ross.abutalabs.com/products/gpucpp
Homepage: https://gpucpp.answer.ai
Language: C++
License: Apache-2.0
License Family: permissive
Last push: 2026-08-21T07:27:10+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 66, longevity 58
- inputs: {"age_days": 825, "days_push": 12, "days_rel": 12, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3984, forks 199 (observed 2026-08-28T04:08:31.724025+00:00)

## What it is
A lightweight, header-only C++20 library for portable low-level GPU compute built on Dawn's WebGPU implementation. It provides a minimal API for creating tensors, kernels, and dispatching compute shaders across Metal, Vulkan, and browsers.

## Use cases
- run gpu compute kernels in c++
- portable webgpu compute across metal and vulkan
- write wgsl compute shaders with a thin c++ wrapper
- run gpu workloads in the browser via webassembly
- learn low-level gpu programming without heavy frameworks

## When to choose
- you want a small, close-to-WebGPU C++ compute library with minimal abstraction
- you need the same GPU compute code to run natively and in browsers
- you prefer explicit WGSL shaders and control over resources

## When to avoid
- you need high-level tensor operations or automatic differentiation like PyTorch or JAX
- you want graphics rendering rather than compute
- you need CUDA-specific features or NVIDIA-only optimizations

## Facets
- artifact type: library
- maturity: active
- function: gpu-computing, developer-tools
- domain: gpu-computing, cross-platform, developer-tools
- platform: cpp, browser, wasm
- tags: webgpu, wgsl, header-only, dawn, compute-shaders, gpgpu, macos, linux

## Member repositories
- AnswerDotAI/gpu.cpp (main) score 79

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:31.724025+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:24:15.075922+00:00, confidence not recorded.
  - readme: https://github.com/AnswerDotAI/gpu.cpp (fetched 2026-08-28T04:08:31.724025+00:00, sha 2ec7ec572005)
  - homepage: https://gpucpp.answer.ai (fetched 2026-08-29T09:17:29.095096+00:00, sha db2c295c337c)
  - site_page: https://gpucpp.answer.ai/api/gpu_8h.html (fetched 2026-08-29T09:17:29.104723+00:00, sha 83f79be3cab0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
