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

wgpu-native

The @torchjsorg/wgpu-native package provides the default high-performance WebGPU backend for Node.js, built on top of the Rust wgpu library.

wgpu logo

Why choose wgpu-native?

  • Performance: Extremely lean and fast, with minimal overhead.
  • Broad Compatibility: Excellent support for Vulkan (Linux/Windows), Metal (macOS), and DX12 (Windows).

Installation

npm install @torchjsorg/wgpu-native;

Usage

import { wgpu } from '@torchjsorg/wgpu-native';
import torch from '@torchjsorg/torch.js';

// Register wgpu as the global WebGPU provider
torch.webgpu.setProvider(wgpu);
Next
BindGroupDescriptor