@@ -7,13 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10- ### Performance
11- - Static weights that onnx-ir passes as anonymous (unnamed) constants — including all
12- conv weights — are now pre-loaded once instead of converted on every forward pass.
13- - BatchNormalization directly after a Conv2d is folded into the conv's weight and bias
14- at load time and removed from the graph. ResNet-18 (Model Zoo v1) at batch 8: 279 → 103 ms.
10+ ### Added
11+ - GPU inference: ` load_onnx(path, backend="wgpu") ` , compiled to Metal on macOS and
12+ Vulkan on Linux / Windows. ResNet-18 on an Apple M-series GPU: 6.1 ms at batch 1,
13+ 35.6 ms at batch 8 (~ 3x faster than ONNX Runtime on CPU). ` available_backends() `
14+ lists the backends in the build.
15+ - CI job running the op tests on wgpu through lavapipe (software Vulkan).
16+ - ReduceMean, ReduceSum, ReduceMax, ReduceMin (needed by the torch dynamo exporter's
17+ global average pooling).
18+ - ` tests/test_resnet.py ` : ResNet-18 end to end vs ONNX Runtime on Model Zoo and
19+ torchvision (legacy + dynamo) exports, with optional ` --bench ` ; run in CI.
20+ - ` tests/test_ops.py ` : per-op edge-case tests against ONNX Runtime, run in CI.
21+ - ONNX interpreter support for Conv2d, fused BatchNormalization, MaxPool2d,
22+ AveragePool2d, and GlobalAveragePool.
23+ - GitHub Actions CI: ` cargo build ` , ` cargo fmt ` / ` cargo clippy ` (non-blocking),
24+ and Python tests via ` maturin develop ` .
25+ - Branch protection on ` main ` : pull requests required, ` cargo build ` and
26+ ` python tests (maturin) ` checks required to merge.
27+ - ONNX interpreter with Gemm, Linear, Relu, Sigmoid, Tanh, Gelu, Softmax,
28+ LogSoftmax, Add, Sub, Mul, Div, Reshape, Flatten, and Transpose ops.
29+ - numpy ↔ Burn tensor bridge (` roundtrip ` ), one copy in each direction.
30+ - Initial maturin/pyo3 project scaffold, ` burn-flex ` + ` onnx-ir ` dependencies.
1531
1632### Changed
33+ - All ops now run on burn-dispatch's ` Dispatch ` backend; the device is chosen per model.
34+ The unused ` burn ` umbrella dependency was replaced by ` burn-dispatch ` .
35+ - Backend failures that happen on a worker thread (e.g. no GPU adapter) now report the
36+ worker's panic message instead of a downstream ` RecvError ` , and model loading is
37+ guarded too, so they surface as ` RuntimeError ` .
1738- Errors now surface as normal Python exceptions instead of ` PanicException ` :
1839 - ` TypeError ` for non-array / non-float32 inputs (with a ` .astype(np.float32) ` hint).
1940 - ` ValueError ` for wrong input count, rank, or a static dim that doesn't match the model.
@@ -22,7 +43,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2243- Rust panic output on stderr is suppressed (the message is in the exception);
2344 set ` RUST_BACKTRACE=1 ` to get it back.
2445
46+ ### Performance
47+ - Static weights that onnx-ir passes as anonymous (unnamed) constants — including all
48+ conv weights — are now pre-loaded once instead of converted on every forward pass.
49+ - BatchNormalization directly after a Conv2d is folded into the conv's weight and bias
50+ at load time and removed from the graph. ResNet-18 (Model Zoo v1) at batch 8: 279 → 103 ms.
51+
2552### Fixed
53+ - Broadcasting between operands of different rank (` [N, C] + [C] ` , Gemm's rank-1 ` C ` ,
54+ ` [N, C, H, W] * [C, 1, 1] ` ) is now done numpy-style. It only worked by accident on
55+ Flex; GPU backends rejected it.
56+ - Gemm ` alpha ` /` beta ` and BatchNorm ` epsilon ` use scalar ops instead of 1-element tensors.
2657- BatchNormalization on non-4D inputs (e.g. ` [N, C] ` after a Linear) no longer
2758 broadcasts to a 4D output; the pre-fused fast path is only used for NCHW.
2859- Fortran-ordered inputs (e.g. ` x.T ` ) were read in memory order, silently scrambling data.
@@ -36,21 +67,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3667- Unsupported ops now fail at ` load_onnx ` with a list of the missing ops, instead of
3768 being skipped with a warning and failing (or silently misbehaving) at inference time.
3869
39- ### Added
40- - ReduceMean, ReduceSum, ReduceMax, ReduceMin (needed by the torch dynamo exporter's
41- global average pooling).
42- - ` tests/test_resnet.py ` : ResNet-18 end to end vs ONNX Runtime on Model Zoo and
43- torchvision (legacy + dynamo) exports, with optional ` --bench ` ; run in CI.
44- - ` tests/test_ops.py ` : per-op edge-case tests against ONNX Runtime, run in CI.
45- - ONNX interpreter support for Conv2d, fused BatchNormalization, MaxPool2d,
46- AveragePool2d, and GlobalAveragePool.
47- - GitHub Actions CI: ` cargo build ` , ` cargo fmt ` / ` cargo clippy ` (non-blocking),
48- and Python tests via ` maturin develop ` .
49- - Branch protection on ` main ` : pull requests required, ` cargo build ` and
50- ` python tests (maturin) ` checks required to merge.
51- - ONNX interpreter with Gemm, Linear, Relu, Sigmoid, Tanh, Gelu, Softmax,
52- LogSoftmax, Add, Sub, Mul, Div, Reshape, Flatten, and Transpose ops.
53- - Zero-copy numpy ↔ Burn tensor bridge (` roundtrip ` ).
54- - Initial maturin/pyo3 project scaffold, ` burn-flex ` + ` onnx-ir ` dependencies.
55-
5670[ Unreleased ] : https://github.com/asjad2401/burn-python/commits/main
0 commit comments