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.
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