Skip to main content
torch.jstorch.jstorch.js
Getting StartedPlaygroundContact
Login
torch.jstorch.jstorch.js
Documentation
IntroductionType SafetyTensor IndexingEinsumEinopsAutogradTraining a ModelProfiling & MemoryPyTorch MigrationBest PracticesRuntimesPerformance
IntroductionRenderersAnalysis
torch.js· 2026
LegalTerms of UsePrivacy Policy
  1. docs
  2. Viz
  3. Introduction

Viz

The @torchjsorg/viz package is the high-performance rendering core of the torch.js ecosystem. It provides low-level WebGPU primitives for drawing and analyzing tensors at 60fps.

Visualization of the Viz rendering pipeline

Why use Viz directly?

While react-ui is easier for most apps, you should use viz directly if:

  • You are building a non-React application.
  • You need to build a custom rendering pipeline not covered by standard components.
  • You want to manage your own WebGPU canvas lifecycle.

Installation

npm install @torchjsorg/viz;

Basic Usage

import { HeatmapRenderer } from '@torchjsorg/viz';

// Zero-copy rendering from GPU to Canvas
const renderer = new HeatmapRenderer(canvasElement);
renderer.render(myTensor); 

Next Steps

  • Renderers - Detailed guide on available rendering classes.
  • Analysis - GPU-accelerated PCA, t-SNE, and statistics.
Next
Renderers