Commit Graph

51 Commits

Author SHA1 Message Date
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
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
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
Charles23R
4727fc3bd2 Burn train api refactor (#4223) 2025-12-18 15:01:50 -05:00
Charles23R
ac43a36ec1 Add support for custom learning strategy (#3921)
* run all benchmarks

* only run selected benchmarks + add cuda backend in benches

* Can now use custom training strategy with single device

* WIP custom example

* Add an example of a custom training strategy

* remove leftover changes from benches branch

* remove unnecessary generic

* fix typo in docs

* lockfile
2025-10-30 09:01:59 -04:00
Guillaume Lagrange
97273a08a6 Fix train result summary (#3935)
* Update train result

* Fix mean_dims example result

* Add persistent renderer config + display summary in examples

* Send summary on train end event + display on drop

* Update summary builder doc
2025-10-27 17:31:19 -04:00
Crutcher Dunnavant
1b284e958a Make Config require Debug (#3689) 2025-09-09 09:04:46 -04:00
Nathaniel Simard
3201a8227e Refactor/seed (#3641) 2025-08-29 14:16:07 -04:00
Nathaniel Simard
adacb4178e Improved Burn Train (#3614) 2025-08-26 17:48:16 -04:00
Guilhem Ané
a959087aa3 Refactor burn-train (#3451) 2025-08-01 15:59:23 -04:00
Guillaume Lagrange
f5d889d29c Update cubecl version, examples and book url (#3387)
* Disable autotune default in small conv examples

* Use released cubecl

* Update burn book url

* Contributor book link

* Fixed slash

* Forgot wgpu
2025-07-18 12:02:16 -04:00
Guillaume Lagrange
e718243748 Fix clippy errors w/ new rust stable (#3325) 2025-06-27 07:54:26 -04:00
Crutcher Dunnavant
f5198e5e6f Chain lint inheritance [was: Disable new default clippy tests] (#3200) 2025-05-20 08:23:11 -04:00
Guillaume Lagrange
66ded5bd19 Improve multi-device data loading strategy (#2890)
* Add batch_with_device

* Add round-robin device assignment

* Refactor w/ distribution strategy

* Remove commented code

* Lazy dataloader split (WIP)

* Add missing

* Whoops

* Return batch

* Simplify strategy

* Fix clippy

* Update  comments

* Remove todo

* Simplify default batchers

* Fix typos trigger on generic bound

* Update book

* Fix audit advisory db

* Remove todo

* Fix comment

* Add multi device test

* Bump half version

* Rename to dispatcher

* Arc instead of box + set default in builder instead

* Use the same batcher for train + valid

* Fix default dispatcher

* Refactor to simplified dataloader trait

* Fix edition 2024 merge

* Add dataloader_split

* Fix clippy

* Remove DynDataLoader + keep vec of concrete dataloader type in multithread

* Fix clippy
2025-04-04 11:08:36 -04:00
Guillaume Lagrange
303a83e909 Update to edition 2024 (#2931)
* Upgrade to edition 2024

* Explicit unsafe

* Fix keywords and unnecessery ref modifiers

* Fix lifetime

* Update lock

* Cargo fmt

* Update CI prev
2025-03-20 10:28:51 -04:00
Guillaume Lagrange
2d9e9b9a19 Clean up -jit suffix in feature flags and modules (#2705) 2025-01-28 09:05:48 -05:00
Guillaume Lagrange
b33bd24f88 Fix no default features flags + update cubecl (#2725) 2025-01-21 14:37:40 -05:00
Guillaume Lagrange
37d87956e2 Fix burn book links (#2303) 2024-09-25 09:07:55 -04:00
Guillaume Lagrange
40d321cc0d Fix tensor data elem type conversion in book (#2211) 2024-08-28 10:55:10 -04:00
Dilshod Tadjibaev
6f2ba34382 Print module part3 - Update book (#1940)
* Update book example guide

* Update Module book section on module display
2024-07-01 12:42:17 -05:00
Guillaume Lagrange
cdd1fa1672 Refactor tensor data (#1916)
* Move distribution to module

* Add new TensorData with serialization support

* Implement display and from for TensorData

* Add missing Cargo.lock

* Add missing bytemuck feature

* Add zeros, ones, full and random TensorData methods

* Refactor Data -> TensorData usage

* Fix tests

Since TensorData is not generic over the element type anymore no type inference can be done by the compiler. We must explicitly cast the expected results to the expected backend type.

* Remove commented line

* Fix import

* Add record-backward-compat

* Remove dim const generic from TensorData

* Support NestedValue de/serialization with TensorData

* Fix burn-jit tests

* Remove eprinln

* Refactor onnx import to use TensorData

* Fix tch from_data

* Fix nested value serialization for u8

* Fix missing import

* Fix reduce min onnx test

* Fix deprecated attribute

* Remove shape getter

* Remove strict assert in tests

* Add tensor data as_bytes

* Add tensor check for rank mismatch

* Fix typo (dimensions plural)

* Fix error message

* Update book examples with from_data and fix Display impl for TensorData

* Add deprecation note
2024-06-26 20:22:19 -04:00
Arthur Brussee
ac9f942a46 Remove GraphicsAPI generic for WgpuRuntime (#1888) 2024-06-17 09:04:25 -04:00
Sylvain Benner
1f8b5d3efb [guide] Remove ambiguity lib vs. executable (#1649) 2024-04-26 15:42:02 -04:00
Guillaume Lagrange
0cbe9a927d Add learner training report summary (#1591)
* Add training report summary

* Fix LossMetric batch size state

* Add NumericEntry de/serialize

* Fix clippy suggestion

* Compact recorder does not use compression (anymore)

* Add learner summary expected results tests

* Add summary to learner builder and automatically display in fit

- Add LearnerSummaryConfig
- Keep track of summary metrics names
- Add model field when displaying from learner.fit()
2024-04-11 12:32:25 -04:00
Nathaniel Simard
1239d9bfa3 [Breaking] Make Tensor, Module, Optimizer !Sync + Refactor Autodiff (#1575) 2024-04-04 16:01:17 -04:00
Nathaniel Simard
b0c5986d16 Feat/lazy init (#1539) 2024-04-02 10:13:35 -04:00
Yu Sun
330552afb4 docs(book-&-examples): modify book and examples with new prelude module (#1372) 2024-02-28 13:25:25 -05:00
Sylvain Benner
4427768570 [refactor] Move burn crates to their own crates directory (#1336) 2024-02-20 13:57:55 -05:00
Dilshod Tadjibaev
44266d5fd4 Make all struct CamelCase (#1316) 2024-02-15 13:00:37 -06:00
Guillaume Lagrange
b9bd42959b Add vision/mnist dataset (#1176) 2024-01-25 16:16:39 -05:00
Nathaniel Simard
eaa4dc3207 Feat/recorder/custom device (#1165) 2024-01-23 13:05:41 -05:00
Kirill Mavreshko
97297538b1 Remove _devauto fuctions (#518) (#1110) 2024-01-06 13:36:34 -05:00
Kirill Mavreshko
1fd07fcb4a Explicit device tensors (#1081) 2023-12-20 17:49:59 -05:00
David Chavez
71d3c1d142 chore(infra): Share some properties across workspace (#1039) 2023-12-12 09:39:07 -05:00
Louis Fortier-Dubois
8fc52113bc Chore/bump v12 (#1048) 2023-12-04 10:47:54 -05:00
Louis Fortier-Dubois
3088c466a5 patch 0.11.1 (#1047) 2023-12-04 10:18:30 -05:00
Timothy
52811f9938 Fix some issues in Burn book (#1042) 2023-12-04 09:23:47 -05:00
Nathaniel Simard
f6d14f1b1a Refactor feature flags (#1025) 2023-12-01 09:48:28 -05:00
Nathaniel Simard
96524d40a1 [Breaking] Refactor Backend Names (#904) 2023-10-29 18:27:49 -04:00
Nathaniel Simard
233922d60c Chore: Bump version for next release (#900) 2023-10-24 19:31:13 -04:00
Nathaniel Simard
dd4e72a98f Feat/checkpoint criteria (#862)
* WIP

* Setup

* Test metrics

* Fix bug

* Cleanup
2023-10-17 09:03:11 -04:00
Nathaniel Simard
620b86de98 Feat training events (#857) 2023-10-10 13:27:03 -04:00
Damien Elmes
d7e9e75099 Fix train-minimal feature and ensure it gets tested (#802) 2023-09-16 09:52:14 -04:00
Nathaniel Simard
af0be5cfeb Chore: bump version (#777) 2023-09-06 12:15:13 -04:00
Nathaniel Simard
8b3d10c4d3 Cleanup of the book + feature flags (#773)
---------

Co-authored-by: louisfd <louisfd94@gmail.com>
2023-09-06 09:16:36 -04:00
Arvid Hammarlund
b58af4a4a3 Cross Entropy with label smoothing and weights. (#755) 2023-09-04 20:20:47 -04:00
Damien Elmes
5b97f1a54b Re-export some submodules and add feature flags for them (#759) 2023-09-04 09:13:52 -04:00
Damien Elmes
520cea16df Fix: burn-core/std depended on sqlite feature (#731) 2023-09-01 09:28:58 -04:00
Asuka Minato
0f7864f11b Path type (#699) 2023-08-27 09:17:48 -04:00
Nathaniel Simard
00d3d208b8 Add book + fix some code (#671) 2023-08-23 11:52:55 -04:00