https://github.com/laggui/burn-2178-mwe
Matmul Web MWE
https://github.com/laggui/burn-2178-mwe
Last synced: about 2 months ago
JSON representation
Matmul Web MWE
- Host: GitHub
- URL: https://github.com/laggui/burn-2178-mwe
- Owner: laggui
- Created: 2024-08-19T17:33:26.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-19T17:59:13.000Z (9 months ago)
- Last Synced: 2025-02-08T14:09:53.551Z (4 months ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Matmul Web MWE
Matmul operation returns zero on web with wgpu.
## Reproduction Steps
> **Important**
> The `Cargo.toml` assumes your burn dev repository to be at the [parent level of this repository folder](./Cargo.toml#L15) (`../burn/crates/burn`). Modify accordingly.1. Clone this repo
```sh
git clone https://github.com/laggui/burn-2178-mwe.git
```2. Build
```sh
./build-for-web.sh
```3. Run
```sh
./run-server.sh
```4. Open your browser at [`http://localhost:8000/`](http://localhost:8000/) and check the console logs.
The correct computation should display:
```
Matmul result [2, 2]:
[10.0, 13.0, 22.0, 29.0]
```Which only happens when the [default matmul strategy](https://github.com/tracel-ai/burn/blob/main/crates/burn-jit/src/kernel/matmul/base.rs#L32) is set to simple. For example:
```rust
MatmulStrategy::Simple {
grid_x: 16,
grid_y: 16,
}
```