Skip to content

Validate CubeCL WebGPU execution in browser WASM #39

Description

@code-tc

Objective

Make the CubeCL path compile and run in a browser through WASM/WebGPU while preserving the native Array API and execution/fusion contracts.

Scope

Browser-safe feature graph; WebGPU device initialization; async availability/errors; representative elementwise, transform, reduction and fused-plan conformance; block-stream smoke test; headless browser CI where WebGPU is available, with an explicit skip/failure policy elsewhere.

Acceptance criteria

  • The crate builds for wasm32-unknown-unknown without OpenCL/native-only dependencies.
  • Browser tests execute representative unfused and fused operations through CubeCL WebGPU.
  • Device-unavailable and device-lost cases are typed and do not silently claim acceleration.
  • The same conformance fixtures are shared with native execution where practical.
  • Bundle/setup instructions and browser support matrix are documented.
  • A streamed-block smoke test demonstrates bounded in-flight work.

Parent: #33

Tembo validation additions

This is an actual-browser runtime validation issue, not a visual-design review. Compilation to WASM or running WGSL through a native adapter is insufficient. The retained evidence must identify browser build, OS, WebGPU adapter/device, driver/runtime, CubeCL version, test artifact revision, operations exercised, device-loss behavior, and whether tests were skipped. Unsupported environments must report a typed skip/failure reason and cannot be counted as passing browser conformance.

automation:
  eligible: true
  executor_profile: tembo
  readiness: blocked
  primary_repository: TinyChain-Inc/ha-ndarray
  base_branch: main
  writable_scope: [Cargo.toml, Cargo.lock, src/cubecl/**, src/fusion/**, src/stream/**, tests/**, web/**, .github/workflows/**, README.md]
  prerequisites: ["#42", "#43", "#44", "#45", "#47", "#49"]
  concurrency_group: cubecl-browser-conformance
  required_commands:
    - "cargo fmt --all -- --check"
    - "cargo check --target wasm32-unknown-unknown --no-default-features --features cubecl,stream"
    - "cargo test --no-default-features --features cubecl,stream"
    - "run the repository browser/WebGPU Playwright conformance command introduced by this issue"
  evidence:
    actual_browser_webgpu: required
    compile_only_result: insufficient
    exact_environment_identity: required
    playwright_report: required
    structured_numerical_results: required
  external_actions: none
  draft_pr_only: true
  completion_authority: human-browser-support-review
  budget: {size: large, max_revisions: 3, max_wall_minutes: 180}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions