Skip to content

wenqinI/wgpu_compute_playground

 
 

Repository files navigation

WebGPU MatMulNBits Workload

WebGPU Supported C++ CMake Platform License

This implements the ONNX Runtime MatMulNBits operation using WebGPU. The WebGPU shaders are directly sourced from the ONNX Runtime project (version v1.22.0).

Prerequisites

Before using or building this project, ensure you have the following prerequisites installed on your system:

Hareware: Basic: ADL(12th) CPU device. Recommend: LNL(15th) CPU device.

Software: Win10/Win11, CMake 3.16 or higher, Python3.x, Visual Studio.

Getting Started

  1. Clone the Repository:

    git clone -b matmulnbits-dev https://github.com/wenqinI/wgpu_compute_playground.git
  2. Initialize/Update Submodules:

    git submodule update --init
  3. Build the Project:

    cmake -S . -B build
    cmake --build build --config Release -j8
  4. Run Tests:

    build\wgpu\Release\matmulnbits.exe > result.txt
    python3 diff.py result-ref.txt result.txt output Elements
  5. Run Benchmarking:

    for %%x in (1 128 1024 2048 4096) do (
        build\wgpu\Release\matmulnbits.exe -m %%x
    )
    

Contributing

Contributions are welcome! If you have any ideas for improvements, new features, or bug fixes, feel free to open an issue or submit a pull request.

License

This project is licensed under the BSD 3-Clause "New" or "Revised" License. See the LICENSE file for more information.

About

Lightweight C++ playground for WebGPU compute shader.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 89.5%
  • Python 4.5%
  • C 3.1%
  • CMake 2.9%