English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

GoGPU vs Born: Deep Comparison of Two Pure-Go GPU Frameworks

Forum topic · ✨步子哥 · 2026-06-13

Summary

This forum post presents an in-depth comparison of GoGPU (v0.41.9) and Born (v0.9.1), two pure-Go GPU projects that share the same foundation: Born's WebGPU backend directly depends on gogpu/wgpu. GoGPU is a low-level graphics and compute framework (Vulkan, DX12, Metal, GLES, WASM backends; zero CGO; event-driven windowing and input; three-state rendering from 0% CPU idle to continuous game loops). Born is a higher-level deep learning framework inspired by Burn, PyTorch, and TinyGrad, offering autodiff, 38+ WebGPU-accelerated operators, Transformers with Flash Attention 2, KV-Cache (3.94x speedup), speculative decoding, ONNX/GGUF import, and verified TinyLlama 1.1B inference. Benchmarks on an RTX 3080 show up to 123x GPU speedup for 1024x1024 MatMul versus CPU. GoGPU shows stronger community traction (305 stars, 163 releases) and broader platform coverage, while Born targets ML training and LLM inference with plans for Vulkan/CUDA/Metal backends, quantization, and an OpenAI-compatible API.

Overview

GoGPU (v0.41.9) and Born (v0.9.1) are two pure-Go GPU projects at different layers of the same ecosystem. Born's WebGPU backend directly depends on gogpu/wgpu, a pure-Go WebGPU implementation — the two share the same root but serve different purposes.

Key points

  • Relationship: Both projects depend on gogpu/wgpu (pure-Go WebGPU, supporting Vulkan, DX12, Metal, GLES). GoGPU is the lower-level graphics engine; Born builds deep learning on top.
  • Positioning:
  • GoGPU: low-level pure-Go graphics/compute framework (rendering, windowing, input). Inspired by Ebiten/Gio. Philosophy: "GPU power, Go simplicity. Zero CGO."
  • Born: pure-Go deep learning framework (training + LLM inference). Inspired by Burn (Rust), PyTorch, TinyGrad. Philosophy: "Models are born production-ready."
  • Project stats:
  • | Metric | GoGPU | Born | |---|---|---| | GitHub stars | 305 | 97 | | Releases | 163 | 35 | | Commits | 265 | 105 | | License | MIT | Apache-2.0 | | Go version | 1.25+ | 1.26+ | | Latest | v0.41.9 (2026-06-11) | v0.9.1 (2026-05-27) |

    Architecture

  • GoGPU: App → Renderer → hal.Device/Queue; multi-threaded (event main thread + dedicated render thread); backends: Pure Go (default), Rust FFI (-tags rust), Browser WASM; graphics APIs: Vulkan, DX12, Metal, GLES, Software; platforms: Windows, Linux (X11/Wayland), macOS, WASM; resource cleanup via TrackResource + runtime.AddCleanup.
  • Born: Backend → Tensor → Autodiff → Optimizer (decorator pattern); backends: CPU (pure Go) and WebGPU (via gogpu/wgpu), with Vulkan/CUDA/Metal planned; uses Go generics (Tensor[DType, Backend]); GPU buffers cleaned via runtime.SetFinalizer. Both have zero CGO.
  • Core capabilities

    GoGPU unique: zero-copy surface rendering, event-driven three-state rendering (idle/animating/continuous), texture loading, native window management (Win32/Cocoa/X11/Wayland), centralized input queue, multi-window + HiDPI, macOS NSMenu, system sounds, clipboard, dark-mode detection, borderless windows with DWM shadow.

    Born unique:

  • Deep learning core: autodiff, 38+ WebGPU-accelerated operators, CNN layers, optimizers (Adam), losses (CrossEntropyLoss), lazy evaluation with command batching.
  • Transformer/LLM: Flash Attention 2 (O(N) memory), speculative decoding (2–4x), KV-Cache (3.94x), MHA/SDPA/GQA, RoPE/ALiBi positional encodings, SwiGLU/GeGLU FFN.
  • Model ecosystem: ONNX import (49 ops), GGUF import (Q4_K/Q5_K/Q6_K/Q8_0), verified end-to-end LLaMA inference (TinyLlama 1.1B), SafeTensors export, TikToken/BPE tokenizers, temperature/top-k/top-p/min-p sampling.
  • Performance

    Born's WebGPU acceleration (RTX 3080):

    | Operation | CPU | GPU | Speedup | |---|---|---|---| | MatMul 1024×1024 | 7143ms | 58ms | 123× | | MatMul 512×512 | 499ms | 12ms | 41× | | MatMul 256×256 | 56ms | 3.7ms | 15× | | NN inference batch=64 | 48ms | 19ms | 2.5× | | NN inference batch=256 | 182ms | 21ms | 8.5× | | NN inference batch=512 | 348ms | 32ms | 10.9× |

    GoGPU rendering modes: Idle (0% CPU, blocks on OS events), Animating (VSync ~60fps), Continuous (unbounded, for game loops).

    Key insight: the 123× MatMul speedup shows Go + WebGPU has production-viable compute performance, while GoGPU's three-state rendering provides fine-grained power control unique to graphics frameworks.

    Documentation & roadmap

  • GoGPU: full pkg.go.dev reference, ARCHITECTURE.md with ADR decision records (e.g., ADR-026 window lifecycle), ROADMAP.md, ~20-line triangle tutorial, 2 dev.to articles (~100K lines of dev history). Planned: gogpu/ui GUI toolkit, v1.0 API freeze.
  • Born: pkg.go.dev reference, PHILOSOPHY.md/USE_CASES.md, MNIST + LLaMA examples. Planned: Vulkan/CUDA/Metal backends, GPTQ/AWQ quantization, PagedAttention + continuous batching, OpenAI-compatible API, v1.0 LTS with 3+ years support.
  • Verdict / use cases

  • Choose GoGPU for: game engines, GUI applications, 2D/3D visualization, general GPU compute (shaders/WGSL).
  • Choose Born for: deep learning training, LLM inference/deployment, GPU-accelerated tensor math.
  • Both are viable for general GPU computation, but they are complementary rather than competing: GoGPU supplies the cross-platform GPU foundation, and Born builds production ML services on top of it. Born's planned Vulkan/CUDA/Metal backends will deepen this symbiosis as it approaches v1.0.

Tags

#golang#gogpu#webgpu#deep-learning#llm-inference#graphics-framework#comparison

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177981211