tinygrad runtime.ops_webgpu

Note

You likely want the upstream tinygrad, not tinygrab. Tinygrab contains AI generated docstrings for a tinygrad snapshot. Upstream: https://tinygrad.org

class tinygrad.runtime.ops_webgpu.WebGPUProgram(name: str, lib: bytes)[source]

Bases: object

This class represents a WebGPU program. It stores the name, library, and compiled shader module of a GPU program.

name

The name of the GPU program.

Type:

str

lib

The library containing the code for the GPU program.

Type:

bytes

prg

The compiled shader module of the GPU program.

Type:

wgpu_device.create_shader_module

class tinygrad.runtime.ops_webgpu.WebGpuAllocator[source]

Bases: Allocator

WebGpuAllocator class.

Allocator

Parent class for this class.

Type:

parent class

copyin(dest, src: memoryview)[source]

Copy data from source to destination.

Parameters:
  • dest – Destination of the data.

  • src (memoryview) – Source of the data.

copyout(dest, src: memoryview)[source]

Copy data from source to destination.

Parameters:
  • dest – Destination of the data.

  • src (memoryview) – Source of the data.

Note

This is a temporary solution and should be removed in the future.

class tinygrad.runtime.ops_webgpu.WebGpuDevice(device: str)[source]

Bases: Compiled

WebGpuDevice class.

Compiled

Parent class for this class.

Type:

parent class