AMEVA-Forge Documentation

Release 2.0.0 Initializing WebGPU... [ Live WebGPU Studio ] [ GitHub Repository ]

4. Vision Center (WebGPU Conv2D Image Filters)

Demonstrates 2D matrix spatial convolution (Conv2D) and multi-channel image tensor processing on raw image pixels using WebGPU.

Device Target: WebGPU (WGSL Parallel Dispatch)
Active Kernel: Sobel Edge Filter (3x3)
Dispatch Latency: 0.0 ms
Resolution: 300 x 300 (90k Threads)

Input Tensor (300x300)

WebGPU Processed Output

Ready. Click a filter to dispatch.

Real-time WebGPU Kernel Dispatch Streamer

[ GPU Context Active ]
System idle. WebGPU Compute Pipeline compiled. 90,000 GPU threads mapped to workgroups. Ready to dispatch filters.

AMEVA-Forge Python Conv2D Spatial Convolution (Running on WebGPU)

[ torch.nn.Conv2d Drop-in ]
import forge as torch
import forge.nn as nn

# 1. Define 2D Convolutional Layer on WebGPU
conv_op = nn.Conv2d(in_channels=3, out_channels=3, kernel_size=3, padding=1).to("gpu")
conv_op.weight = torch.tensor(spatial_kernel_3x3, device="gpu")

# 2. Upload raw image pixel tensor to GPU VRAM & Dispatch 90k parallel threads
img_gpu = torch.tensor(raw_image_rgb, device="gpu") # [1, 3, 300, 300]
filtered_tensor = conv_op(img_gpu)
await filtered_tensor.realize() # WebGPU WGSL compute realization

Sobel Edge Detection: 2D Spatial Discrete Gradient