Commit Graph

426 Commits

Author SHA1 Message Date
Genna Wingert
5b4b334632 chore: Update to upstream changes in cubecl (#4670)
* Update to register changes

* Fix clippy

* Fix candle

* Reformat
2026-03-25 08:13:21 -04:00
Guillaume Lagrange
a615c61451 Refactor backend tests to set device settings at initialization + use Dispatch (#4666)
* Fix autodiff device checkpointing

* Refactor tests and fix some out dtypes

* Cargo fmt

* Update xtask handle_backend_tests

* Remove debug

* Cleanup

* Fix remote dtype usage

* Feature gate f16 tests

* Fix default quant scheme

* Fix cuda enabled by default in workspace

* Cargo fmt

* Fix clippy

* Fix display

* Fix float elem metal

* Update notes

* Fix burn-store tests
2026-03-24 16:04:19 -04:00
Guillaume Lagrange
8f1ac9a7ed Bump rustls-webpki to 0.103.10 and tar to 0.4.45 (#4663)
* Bump rustls-webpki to 0.103.10

* Bump tar to 0.4.45
2026-03-23 08:29:42 -04:00
Guillaume Lagrange
4e962f9484 Remove named tensor (#4628) 2026-03-13 15:38:00 -04:00
Genna Wingert
fce1a57211 refactor: Vector size generic (#4624) 2026-03-13 08:36:34 -04:00
Nathaniel Simard
3c6b710dca Refactor/device handle (#4593) 2026-03-11 18:46:49 -04:00
Nathaniel Simard
91e784e3fb Bump versions (#4589) 2026-03-02 12:05:46 -05:00
Guillaume Lagrange
f451a12e8d Add evaluator summary (#4578)
* Add evaluator summary

* Add mnist summary

* Remove comment
2026-02-27 11:37:07 -05:00
Guillaume Lagrange
13b7513a2f [Feat] Global backend Dispatch (#4508)
* Add burn engine (WIP)

* Move feature flag checks

* Implemen device count

* Implement change_backend_float

* Simple example

* Multi backend WIP

* Cleanup

* WIP

* Big ol macro

* Comments

* Automatic backend repetition for macros

* Fix usage example

* Rename engine -> dispatch

* Rename to burn-dispatch

* Replace compile_error with build cfgs

* Cleanup

* Fix whitespace

* Clippy

* Ignore usage example

* Add From impls

* Implement transaction

* Remove example

* Fix warning

* Use in mnist example + fix issues

* WIP autodiff working (needs cleanup)

* Cleanup macros + complete ops

* Rename DispatchDevice

* Cargo fmt

* Add AutodiffDevice tuple struct wrapper

* Fix attn

* Use device.inner() for valid

* Fix clippy

* Revert example debug

* Fix doc

* Add autodiff doc + remove print

* Remove comments

* Rename DispatchDevice::autodiff
2026-02-25 13:10:49 -05:00
Tyooughtul
4567e84cb3 doc(notebook) : add more basic operations and some examples (#4542)
* doc(notebook) : add more basic operations and some examples
Add execution outputs to basic-tensor-op.ipynb
- Add outputs for trigonometric, reduction and comparison operations
- Add operation summary and PyTorch API comparison

Refactor plots.ipynb for autodiff and gradient descent
- Rewrite notebook to demonstrate autodiff and gradient flow
- Add GD from scratch and linear regression examples
- Update dependencies and remove unused plotting code

* resolve review feedback

* fix(notebook): - delete conclusion as review feedback
- use tensor instead of iter
- rename file
2026-02-24 08:12:41 -05:00
Dilshod Tadjibaev
9d2d87b8bf fix: resolve macOS build and test failures (#4545)
* fix: make vulkan feature opt-in for guide example

The guide example had `burn/vulkan` in its default features, which
caused `cargo build` to fail on macOS without the Vulkan SDK installed.
Workspace feature unification forced all workspace members to build
with the spirv feature, triggering a panic in cubecl-wgpu's build script.

Move vulkan to a non-default opt-in feature, matching the pattern used
by other examples (mnist, text-classification, server).

* skip burn-cuda tests on macOS

CUDA is not available on macOS. Gate the entire test module with
cfg(not(target_os = "macos")) to avoid test failures.

* fix burn-wgpu dtype test on macOS

Without the `metal` feature flag, wgpu still uses Metal at runtime on
macOS. The fallback test branch assumed a non-Metal GPU and asserted
F64 support, which Metal doesn't provide. Add a macOS-specific branch
that matches actual Metal runtime capabilities.

* enable vulkan by default on non-macOS for guide example

Use platform-conditional dependency to keep vulkan enabled by default
on Linux/Windows where it works without extra setup, while excluding
it on macOS where the Vulkan SDK is required.

* add comment for vulkan feature in guide example
2026-02-20 07:28:17 -05:00
Genna Wingert
66733ae0eb refactor: Metadata type/strides refactor (#4534)
* Remove R::supported_line_sizes

* refactor: Metadata optimization

* Revert temp fix

* Rename `ShapeError` to `MetadataError`

* Cleanup

* Bump cubecl and cubek rev

* Fix doc test

* Bump cubecl rev
2026-02-19 10:07:37 -05:00
Antonio Souza
d63bd6a21b Replace Vec-based TransitionBuffer with tensor-backed storage (#4504)
* Replace Vec-based TransitionBuffer with tensor-backed storage

Signed-off-by: arferreira <arfs.antonio@gmail.com>

* Use inplace for slice_assign

Signed-off-by: arferreira <arfs.antonio@gmail.com>

* Add SliceAccess trait for generic tensor-backed replay buffer

---------

Signed-off-by: arferreira <arfs.antonio@gmail.com>
2026-02-18 17:37:30 -05:00
Guillaume Lagrange
07f4132373 Remove getrandom w/ wasm_js backend (#4515) 2026-02-13 11:35:26 -05:00
Guillaume Lagrange
b7b388bac1 Upgrade to rand 0.10 (#4500)
* Upgrade to rand 0.10

* Clippy

* Fix examples

* Remove `From<&StdRng>` example

* Fix RngSource

* Remove import

* Cleanup

* Unused import

* Cleanup

* Update cubecl/cubek revs and regenerate lockfile

---------

Co-authored-by: Dilshod Tadjibaev <939125+antimora@users.noreply.github.com>
2026-02-10 18:55:21 -06:00
Nathaniel Simard
d4dbe9ef84 Chore: Pre-Release 0.21.0-pre.1 (#4494) 2026-02-09 15:47:05 -05:00
Charles23R
798c209094 Feature flag + Tests for RL in burn-rl and burn-train (#4470)
* burn-rl tests

* agentenv loops unit tests

* rl feature flag

* lint

* typo

* typo

* mock docs

* publish workflow

* typo
2026-02-09 11:58:09 -05:00
github-actions[bot]
10815f5cf8 Combined PRs (#4485)
* Bump interprocess from 2.2.3 to 2.3.1

Bumps [interprocess](https://github.com/kotauskas/interprocess) from 2.2.3 to 2.3.1.
- [Release notes](https://github.com/kotauskas/interprocess/releases)
- [Commits](https://github.com/kotauskas/interprocess/compare/2.2.3...2.3.1)

---
updated-dependencies:
- dependency-name: interprocess
  dependency-version: 2.3.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump getrandom from 0.3.4 to 0.4.1

Bumps [getrandom](https://github.com/rust-random/getrandom) from 0.3.4 to 0.4.1.
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/getrandom/compare/v0.3.4...v0.4.1)

---
updated-dependencies:
- dependency-name: getrandom
  dependency-version: 0.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump tracel-xtask from 4.12.3 to 4.13.1

Bumps [tracel-xtask](https://github.com/tracel-ai/xtask) from 4.12.3 to 4.13.1.
- [Release notes](https://github.com/tracel-ai/xtask/releases)
- [Commits](https://github.com/tracel-ai/xtask/compare/v4.12.3...v4.13.1)

---
updated-dependencies:
- dependency-name: tracel-xtask
  dependency-version: 4.13.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-09 07:48:17 -05:00
Charles23R
4b259aa3b3 Burn rl (#4447)
* wip burn-rl

* clean up types traits, remove paradigm trait, improve learner

* code quality

* book

* doc

* error in doc

* revert TrainStep rename and remove paradigm components

* trainstep refactor with assoc types

* fix docs

* fix warning

* comment

* remove evaluator step

* add more rl stuff and change Adaptor trait

* metrics for rl and revert adaptor change

* docs + cleanup event processor for rl

* policy vs agent refactor

* rework renderer

* policy no longer generic over env

* early version of checkpointing

* versioning

* off policy training loop

* naming consistency and loading from record

* naming

* add other backends

* strategies and configs

* env initializer and cum reward metric

* transition backend thing compiles

* mostly docs and naming

* reorganize files

* batchable trait and re-arrange some bounds

* start env runner refactor

* rework autobatcher and env_runnner episodes

* change autobatcher dynamic and tweak dqn params

* fix typos and warnings

* params tweeking

* file naming

* fix docs

* metrics api and dependency bump

* address PR comments and fix lint

* kill process when user kills training

* handle kill signal renderer

* format

* remove dqn-agent from ci tests bc of dependency issue
2026-02-04 15:55:44 -05:00
keke
5f13421c28 Scope RUSTFLAG for the wasm-pack build (#4358)
* Add check for wasm-bindgen installation

Check for wasm-bindgen installation and install if missing.

* Simplify build script by removing wasm-bindgen check

Removed installation check for wasm-bindgen.
2026-02-04 09:00:23 -05:00
Florian Liao
51811d5563 chore: fix typos caught by xtask (#4406) 2026-01-30 07:38:12 -05:00
Genna Wingert
1d7cbaf8bb opt(burn-cubecl): Optimized tensors by default (#4402)
* Fix all kernels to work with optimized tensors

* Remove test code from guide

* Clean up guide features

* Update cubecl

* Fix split analysis

* Update cubecl

* Manually reformat

* Fix name

* Use unreachable instead of panic for destructure

* Use wildcard for candle

* Move `decompose_linear` to utils

* Flip test condition for candle
2026-01-29 07:47:24 -05:00
Dilshod Tadjibaev
933fdf4f69 Move ONNX crates to burn-onnx repository (#4393)
* Move ONNX inference MNIST example to burn-onnx

Moving to https://github.com/tracel-ai/burn-onnx/tree/main/examples/onnx-inference

* Move Raspberry Pi Pico example project to burn-onnx

Moving to https://github.com/tracel-ai/burn-onnx/tree/main/examples/raspberry-pi-pico

* Move image-classification-web example to burn-onnx

Moving to https://github.com/tracel-ai/burn-onnx/tree/main/examples/image-classification-web

* Refactor import-model-weights example to use burn-store

Replace burn-import with burn-store for loading PyTorch and Safetensors
model weights. Convert from NamedMpk (.mpk) format to Burnpack (.bpk)
format for native Burn model storage.

- Use PytorchStore and SafetensorsStore for weight loading
- Use BurnpackStore for saving/loading converted models
- Rename namedmpk binary to burnpack
- Add PyTorchToBurnAdapter for Safetensors files exported from PyTorch
- Update inference to accept Model directly instead of ModelRecord

* Remove ONNX to Burn development guide from contributor-book

The guide has been moved to the burn-onnx repository:
https://github.com/tracel-ai/burn-onnx/blob/main/DEVELOPMENT-GUIDE.md

* Update Cargo.lock

* Move pytorch-tests and safetensors-tests from burn-import to burn-store

Migrate test directories from crates/burn-import/ to crates/burn-store/
and update all tests to use the new burn-store API.

Changes:
- Update Cargo.toml dependencies from burn-import to burn-store
- Replace PyTorchFileRecorder/SafetensorsFileRecorder with PytorchStore/SafetensorsStore
- Convert record-based loading to direct model loading via ModuleSnapshot::load_from()
- Convert LoadArgs options to fluent builder pattern (.with_key_remapping(), etc.)
- Fix model configurations to match actual PyTorch weight file dimensions
- Add init() methods for models that previously only had new_with(record)

All 37 pytorch tests and 1 safetensors test pass.

* Fix test file paths after moving test directories to burn-store

Update paths in burn-store/src tests to reference the new locations
of pytorch-tests and safetensors-tests directories.

* Add migration guide for burn-import to burn-store

Document migration path from deprecated PyTorchFileRecorder and
SafetensorsFileRecorder to the new PytorchStore and SafetensorsStore APIs.
Cover API mapping, code examples, and common migration issues.

Include details on printing LoadResult for debugging and helpful suggestions.

* Remove burn-import crate (moved to burn-onnx repo)

The burn-import crate has been moved to a separate repository:
https://github.com/tracel-ai/burn-onnx/tree/main/crates/burn-import

For loading PyTorch and SafeTensors model weights, use burn-store instead
with PytorchStore and SafetensorsStore.

* Replace pytorch/safetensors docs with unified model-weights page

Consolidate PyTorch and SafeTensors model import documentation into a
single comprehensive page covering burn-store usage. The new page covers:

- All supported formats (Burnpack, SafeTensors, PyTorch)
- Loading and saving workflows
- Advanced features (filtering, remapping, partial loading, zero-copy)
- API reference and troubleshooting

* Simplify burn-store README and point to Burn Book

* Consolidate model weights docs into saving-and-loading page

Merge the model-weights documentation into the main saving-and-loading
page, providing a single comprehensive guide for all model persistence
operations using burn-store.

- Remove separate import/model-weights.md page
- Update saving-and-loading.md with full burn-store documentation
- Remove unused SVG images from import folder
- Update navigation in SUMMARY.md and import/README.md

* Move ONNX import to standalone section, point to burn-onnx repo

- Create new onnx-import.md as standalone top-level section
- Update links to point to burn-onnx repo (github.com/tracel-ai/burn-onnx)
- Remove import/ folder (no longer needed)
- Streamline documentation with quick start focus

* Restore full ONNX import documentation content

Restored detailed content including:
- Understanding ONNX section
- Burn's ONNX Support advantages
- ONNX compatibility and opset version guidance
- Step-by-step guide with code examples
- Advanced configuration options
- Troubleshooting section
- Examples and resources with links to burn-onnx repo

* Update ONNX examples links to burn-onnx repo

* Update ONNX-related example links in examples.md to burn-onnx repo

* Fix Burnpack extension: .burnpack -> .bpk

* Remove ONNX Tests README reference from docs

* Improve table formatting in ONNX import and saving docs

Reformats markdown tables in onnx-import.md and saving-and-loading.md for better readability and consistency. No content changes, only improved alignment and line breaks.

* Remove onnx-ir and onnx-ir-derive crates

Moved to https://github.com/tracel-ai/burn-onnx

* Remove burn-onnx crate

Moved to https://github.com/tracel-ai/burn-onnx

* Remove ONNX references from workspace config and README

- Remove burn-onnx entries from Cargo.toml workspace members/exclude
- Remove RUSTSEC-2024-0437 (protobuf) from audit.toml
- Update README ONNX section to point to burn-onnx repo
- Update README model loading section to point to new docs
- Remove ONNX example from README (moved to burn-onnx)

* Clean up remaining ONNX references

- Remove ONNX publish jobs from publish.yml
- Update semver-checks exclude list
- Update burn-book overview.md links
- Update burn-book no-std.md links to burn-onnx repo
- Remove ONNX proto license from NOTICES.md
- Update .gitignore comment

* Remove unused protobuf and rust-format dependencies

* Remove onnx-tests example from contributor-book

* Update Cargo.lock

* Format long line in test for readability

Split a long line in the should_fail_if_struct_field_is_missing test to improve code readability. No functional changes were made.

* Restore Record-based saving/loading sections per PR feedback

* Explain burn-store motivation in saving-and-loading docs

* Remove em dash from burn-store intro

* Format long line in test for readability
2026-01-28 14:38:11 -06:00
Guillaume Lagrange
5843c6ef70 Move ONNX import to burn-onnx crate (#4361)
* Move ONNX import into burn-onnx crate

* Update publish

* Update burn-import -> burn-onnx

* Fix clippy warnings that are no longer allowed

* Allow unused

* Update contributor book references to burn-onnx

Update all burn-import path references in the ONNX development guide
to point to the new burn-onnx crate location.

* Remove ONNX integration steps from burn op guide

Deleted the section detailing how to add a new operation to burn-onnx, including ONNX IR and code generation mapping steps. This streamlines the guide and removes outdated or redundant ONNX-specific instructions.

* Update onnx-ir references from burn-import to burn-onnx

Update documentation and code comments to reference the new burn-onnx
crate instead of burn-import.

* Update ONNX test producer name to burn-onnx-test

Update producer_name metadata in Python test scripts from
"burn-import-test" to "burn-onnx-test" for consistency.

* Undo ONNX file changes
2026-01-21 13:39:26 -05:00
Sameer
ed6b600035 Add DataframeDataset example using Polars (#4298)
* docs: add DataframeDataset example using Polars (#2428)

* chore: add required-features for dataframe-dataset example

* refactor dataframe example to reuse shared types and download utility

* chore: formated code
2026-01-19 09:50:51 -05:00
Guillaume Lagrange
e2d8833ff9 Bump burn version 0.21 (#4333)
* Bump burn version 0.21

* Feature gate tracing
2026-01-15 13:14:41 -05:00
Guillaume Lagrange
67e7a966af Set release version (#4331) 2026-01-15 10:10:48 -05:00
Guillaume Lagrange
98e853bfd9 Fix some example configs (#4329) 2026-01-14 17:20:01 -05:00
Charles23R
4e4c0a564c Clean learning api (#4283)
* clean up types traits, remove paradigm trait, improve learner

* code quality

* book

* doc

* error in doc

* revert TrainStep rename and remove paradigm components

* trainstep refactor with assoc types

* fix docs

* fix warning

* comment

* remove evaluator step
2026-01-12 08:30:44 -05:00
Genna Wingert
7b32614f16 refactor: Migrate to usize indexing (#4273)
* Migrate to `usize` indexing

* Fix merge

* Update cubecl

* Update cubek
2026-01-08 12:53:31 -05:00
Crutcher Dunnavant
8628cd8cd4 Refactor dop_timer for multiple trials (for warmup). (#4288) 2026-01-08 08:48:08 -05:00
Charles23R
8bd616f107 Checkpointer interrupt (#4268)
* checkpointer interrupts training

* better logging
2026-01-02 09:53:15 -05:00
Crutcher Dunnavant
439a26c0ff Plumb deep tracing feature. (#4234) 2025-12-23 15:55:40 -05:00
Nathaniel Simard
91dd62c92a Chore/pre release 6 (#4224) 2025-12-18 15:50:25 -05:00
Charles23R
4727fc3bd2 Burn train api refactor (#4223) 2025-12-18 15:01:50 -05:00
Crutcher Dunnavant
a119b279ce Add tracing::instrument and refactor collective operations. (#4157)
* Tracing; WIP

* WIP towards all_reduce tuning.

* Add tracing support for collective operations and refactor all_reduce implementation

* wip

* Refactor all_reduce by removing monoid_broadcast and migrating shared tensor map utilities to a centralized module. Add tracing instrumentation for collective operations. Include minor performance tweaks and fixes across broadcast, reduce, and related modules.

* Refactor collective operations by introducing `PeerDeviceMap` and `get_peer_devices`. Simplify device handling in broadcast and all_reduce functions. Migrate shared logic to `tensor_map.rs` for improved reuse and clarity.

* Refactor all_reduce_sum_centralized return type to use `CollectiveTensorMap`. Remove unused `HashMap` dependency for cleaner imports.

* Update `tracing` dependency configurations and align features across crates

- Add `attributes` feature to `tracing` for enhanced functionality in multiple crates.
- Standardize inclusion of `tracing/std` in applicable feature sets.
- Fix minor typo in `reduce_timing` example documentation.

* Update `tracing-core` and `tracing-subscriber` configurations to enforce default features across crates

- Add and standardize `default` features for `tracing-core` and `tracing-subscriber`.
- Extend `tokio` with `tracing` feature in `burn-communication`.
- Align dependency feature sets for consistent tracing behavior.

* Add `tracing` and `tracing-core` dependencies with standardized feature configurations

- Include `tracing` and `tracing-core` in `Cargo.toml` with appropriate features across crates.
- Add `tracing/default` and `tracing-core/default` to feature sets in `burn`.
- Remove redundant `default` feature usage for `tracing-core` in `burn-train` and `burn-import`.

This is still broken for the no-std target:
```terminaloutput
$ cargo build --color always --no-default-features --target thumbv6m-none-eabi -p burn
```

* this doesnt work

* Remove portable-atomic dependencies and make tracing optional

Eliminates all uses of portable-atomic and portable-atomic-util from the workspace, including conditional dependencies for non-atomic pointer targets. Updates tracing and tracing-core dependencies to be optional in all affected crates, and adjusts feature flags to use dep:tracing and conditional tracing features. Also updates attribute macros in burn-autodiff to only use tracing instrumentation when the std feature is enabled.

* Add AllReduceOp and AllReduceResult imports to server.rs

Imported AllReduceOp and AllReduceResult in local/server.rs to support additional collective operations. This prepares the server module for handling all-reduce functionality.

* Reformat imports in server.rs for readability

Adjusted the formatting of the import statements in server.rs to improve readability and maintain consistency with Rust style guidelines. No functional changes were made.

* Refactor collective operations to generalize `WebSocket` to `Protocol` and improve shared logic reuse.

* Fix typo in error message: "missmatch" → "mismatch" in collective operations

* Refactor: Replace `send_err_to_all` with `fail` for improved error handling consistency in collective operations.

* Refactor `Op` to simplify `peer_devices` acquisition logic and reuse shared operations

* Refactor: Inline await expressions in `all_reduce` and `broadcast` operations; simplify `peer_devices` logic by removing redundant implementation.

* Refactor: Simplify `reduce`, `all_reduce`, and `broadcast` operations by replacing `into_iter` with `iter`, removing unused imports, and streamlining collection mechanisms

* Refactor: Move `effective_root` and `peers` methods from `BroadcastOp` to `BroadcastOpCall` to simplify struct design and enhance cohesion

* Refactor: Simplify `broadcast` operation by reordering logic, inlining expressions, and enhancing readability

* Refactor: Use `expect` for clearer error handling in `reduce` operation, inline variable for global strategy

* Refactor: Rename `reduce_timing` to `dop_timer`, modularize components into `workers`, `parsers`, and `event_utils`, and simplify event instrumentation logic.

* Refactor: Remove unused imports, streamline tracing setup, and simplify `WorkerHandle` interface by removing unused methods and variables

* Refactor: Relocate `WorkRequest` enum to `workers.rs` and remove unused import in `run` function

* Refactor: Remove redundant default values in `Args` struct definition

* Refactor: Simplify tensor reduction and broadcasting logic, streamline `peer_devices` handling, and remove unused imports

* readme/otel

* Simplify imports and std propagation.

* fmt

* rebase/fix
2025-12-16 08:14:46 -05:00
Crutcher Dunnavant
c30effda3d Fix typo in comment for logger_task function (#4159) 2025-12-12 09:17:42 -05:00
Bjorn Beishline
a93596ead8 Update raspberry-pi-pico example to use the Pico 2, and burnpack (#4132)
* Update the Raspberry Pi Pico example to RP Pico 2

* Update documentation for no-std
2025-12-09 07:56:59 -05:00
Nathaniel Simard
42edc63ecf Chore/pre release 5 (#4141) 2025-12-08 09:24:46 -05:00
github-actions[bot]
08879393e3 Combined PRs (#4140)
* Bump tokenizers from 0.22.1 to 0.22.2

Bumps [tokenizers](https://github.com/huggingface/tokenizers) from 0.22.1 to 0.22.2.
- [Release notes](https://github.com/huggingface/tokenizers/releases)
- [Changelog](https://github.com/huggingface/tokenizers/blob/main/RELEASE.md)
- [Commits](https://github.com/huggingface/tokenizers/compare/v0.22.1...v0.22.2)

---
updated-dependencies:
- dependency-name: tokenizers
  dependency-version: 0.22.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump log from 0.4.28 to 0.4.29

Bumps [log](https://github.com/rust-lang/log) from 0.4.28 to 0.4.29.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.28...0.4.29)

---
updated-dependencies:
- dependency-name: log
  dependency-version: 0.4.29
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump uuid from 1.18.1 to 1.19.0

Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.18.1 to 1.19.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.18.1...v1.19.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-version: 1.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump libc from 0.2.177 to 0.2.178

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.177 to 0.2.178.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.178/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.177...0.2.178)

---
updated-dependencies:
- dependency-name: libc
  dependency-version: 0.2.178
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-08 07:55:54 -05:00
Dilshod Tadjibaev
bd695bd750 Migrate ONNX import to burnpack format (removing Record type) (#4122)
* Handle empty tensors in cat and slice_assign ops

Updated tensor API to treat empty tensors as no-ops in slice_assign and to filter out tensors with size 0 along the concatenation dimension in cat. Added tests to verify correct behavior when handling empty tensors and empty slice assignments. This prevents backend errors and ensures consistent results for edge cases.

* Clarify handling of empty slices and tensors in ops traits

Added documentation notes to BoolTensorOps, IntTensorOps, and FloatTensorOps traits specifying that empty slice assignments and empty tensors are handled at the high-level tensor API and will not be passed to backend implementations. This clarifies backend responsibilities and prevents unnecessary checks for empty cases.

* Refactor tensor concatenation to simplify filtering

Streamlined the filtering of non-empty tensors by directly mapping to primitives, reducing unnecessary intermediate steps and improving code clarity in the tensor concatenation logic.

* Migrate model export to burnpack format

Removed support for multiple record types (PrettyJson, NamedMpk, Bincode, etc.) and updated all model export logic to use burnpack format exclusively. Refactored BurnGraph and NodeCodegen to remove precision settings and record type abstractions. Updated build scripts, CLI, and tests to reflect burnpack-only workflow. Deleted legacy test_record_type.rs and related code paths.

* Refactor LSTM tensor ops to use NdArray backend

Replaces manual byte-level tensor manipulation in LSTM import with NdArray backend tensor operations for slicing, transposing, and bias addition. Simplifies code and improves maintainability by leveraging backend tensor APIs for all transformations during ONNX import. Adds SerializationBackend type alias and updates helper functions in node_traits.rs.

* Switch ONNX example to runtime-loaded .burnpack weights

Removed the embedded-model feature and updated dependencies to use burn-store with the burnpack feature. Updated README and build script to reflect that model weights are now stored in .burnpack format and loaded at runtime, simplifying the import process and improving support for larger models.

* Update ONNX import docs for burnpack format

Revised documentation to clarify the use of `.burnpack` files for model weights, updated dependency instructions, and improved step-by-step guidance for importing ONNX models into Burn. Contributor guide now references `.burnpack` files and updates serialization details for new ONNX operators.

* Remove dead code allowance from extract_node_data

The #[allow(dead_code)] attribute was removed from the extract_node_data function, indicating that the function is now used or the allowance is no longer necessary.

* Move extern crate alloc to top of file

Relocated the 'extern crate alloc;' statement to the beginning of node_traits.rs for improved clarity and convention. Removed redundant extern crate statement at the end of the file.

* Add embedded model weights support for ONNX import

Introduces the `embed_states` option to ModelGen, allowing model weights to be embedded in the binary using `include_bytes!`. Updates documentation and code generation to support loading models from embedded weights, which is useful for WebAssembly and single-binary deployments. Also updates dependencies and build script for image-classification-web example to use embedded weights.

* Remove unused 'bytes' dependency from burn-store

The 'bytes' crate was removed from burn-store's dependencies in Cargo.toml and Cargo.lock, indicating it is no longer required.

* Refactor LinearNode to handle weight layout without transposition

Updated LinearNode codegen to use LinearLayout::Col for ONNX Gemm nodes, eliminating the need for weight transposition during import. Removed the create_lazy_snapshot_with_transform and transpose_2d utilities, simplifying snapshot logic and reducing code complexity.

* Add has_bias support to LayerNorm nodes

Introduces a has_bias field to LayerNormConfig and updates LayerNormalizationNode codegen to handle models with or without bias (beta) parameter. The ONNX importer now detects the presence of bias and configures Burn's LayerNorm accordingly, ensuring correct parameter initialization and snapshot handling.

* Support runtime split size calculation using num_outputs

Adds logic to handle split size calculation at runtime when static shape is unavailable, using num_outputs in both codegen and processor. Updates SplitConfig and related tests to support this scenario, ensuring split nodes can be generated and processed without static shape information.

* Handle transA in Gemm to Linear conversion

Added a check to ensure Gemm nodes with transA=1 are not converted to Linear, as only transA=0 is supported. Also updated documentation and removed transA attribute during conversion.

* Refactor model checks to use burn-store for test data

Replaces burn-import and PyTorchFileRecorder usage with burn-store and PytorchStore in all model-checks crates. Updates Cargo.toml dependencies and main.rs files to use new test data loading approach, adds TestData::new initializers, and updates file extensions for RF-DETR model weights. Also restricts onnx dependency version in rf-detr/get_model.py.
2025-12-05 09:37:02 -06:00
Bjorn Beishline
f5d81f61a8 Fix raspberry pi pico example not compiling (#4034)
* Fix raspberry pi pico example not compiling

* Update dependencies for raspberry pi pico

* Update deps in raspberry-pi-pico

* Remove raspberry-pi-pico from workspace

* Fix lints for run_model
2025-12-02 07:52:44 -05:00
Nathaniel Simard
3f4d5a88b4 Bump version (#4102) 2025-12-01 14:12:33 -05:00
Nathaniel Simard
b4be838baa Feat/runtime error (#4079)
* WIP: Fix tests

* WIP

* Doc

* Better error name

* Set rev

* Format

* Fix docs

* Set main rev

* Fix comments
2025-11-28 12:08:51 -05:00
Nathaniel Simard
19db09c968 Feat/error handling cubecl (#4076) 2025-11-27 11:05:09 -05:00
Nathaniel Simard
ca8cf219f0 Refactor/autotuner (#4068) 2025-11-26 09:22:14 -05:00
Nathaniel Simard
88d662d8bf Chore: Prepare pre-release 3 (#4060) 2025-11-24 11:44:46 -05:00
Charles23R
175d6f1bce Refactor MetricEntry (#4031)
* Remove name from metric entry and introduce metric ids

* reemovee tags from metric entry struct

* update book

* standardize how the metric entries are passed to loggers

* complete doc
2025-11-20 20:46:36 -05:00
Marc-Anthony
8f0bd68f7f BUG: Fixed burn version (#4035)
* feat: fixed burn version

* fix: burn version

* fix: version number
2025-11-18 10:32:01 -05:00
Nathaniel Simard
cc0f22a512 Bump version (#4030) 2025-11-17 10:04:55 -05:00