v0.23.0-pre.2预发布2026-11-09
What's Changed
- chore(deps): bump actions/checkout from 6 to 7 (#6280) @dependabot[bot]
- feat(core): stream batches through a split model with a thread per stage (#6277) @ThierryCantin-Demers
- Migration: Implement LayerParallelism::from_layers to rebuild the model from its LayerSequence.
- refactor(interpolate)!: narrow resize options and consolidate alignment (#6288) @laggui
- Migration: Coordinate transforms and cubic coefficients move into InterpolateMode variants. Use HalfPixel for the previous align_corners(false), AlignCorners for true, and update serialized configurations. Grid sampling uses GridSampleMode.
- ci: save Rust caches only from main and let main runs finish (#6233) @agarg21
- refactor(linalg): remove QR fusion workaround (#6304) @laggui
- perf(fusion): resolve a collective's members on every device at once (#6293) @ThierryCantin-Demers
- ci: run staging pin checks only on staging branch pushes (#6300) @laggui
- Bump cubecl to bbd78b5 and cubek to 17e417b (#6309) @ThierryCantin-Demers
- fix(nn): use effective kernels for dilated Same padding (#6286) @onenewcode
- perf(autodiff): run float collectives on the inner backend's collective (#6274) @ThierryCantin-Demers
- fix(dataset): return errors for invalid JSON rows (#6284) @onenewcode
- Remote backend: backend extensions, graph capture and device queries on a worker (#6308) @nathanielsimard
- fix(extension): clippy allow large enum variant (#6324) @laggui
- feat(dataset): add ImageFolderDataset::class_name (#6310) @Reacher3745
- feat!: matmul and attention on CubeK tile routines alone; native Metal (#6291) @louisfd
- Migration: The experimental tile-kernels-only feature and old matmul/flash-attention entry points are removed; use matmul and attention.
- perf(flex): use macerator 0.5.2 ops for exp, sigmoid, softmax and rounding (#6313) @antimora
- refactor(cubecl): tidy the tile attention and fused matmul glue (#6328) @louisfd
- fix(cubecl): use InputScalar for max_pool3d infinity to fix WGSL compilation (#6298) @vboussot
- Bump cubecl to fdba0a8 and cubek to 06e1c8e (#6332) @ThierryCantin-Demers
- Device::mode: compile-only and tune passes apply where the work runs (#6326) @nathanielsimard
- docs(readme): refresh Burn branding and badge layout (#6344) @laggui
- feat(remote)!: defer remote and router failures to the tensors they write (#6329) @nathanielsimard
- Migration: RouterClient::flush returns a Result.
- fix: gate burn-nn linalg layers; burn-remote client builds warning-free (#6327) @nathanielsimard
- Migration: Enable linalg for CosineSimilarity, PairwiseDistance, CosineEmbeddingLoss, TripletMarginLoss or orthogonal initialization.
- feat(train)!: add optimizer-step metrics and grouped learning-rate reporting (#6256) @laggui
- Migration: Replace metrictrainnumeric(LearningRateMetric::new()) with metrics(LearningRateMetric::new()). Custom training strategies emit LearnerEvent::OptimizerStep after each optimizer update.
- docs(readme): remove redundant title and move badges above description (#6346) @laggui
- feat(group): generate a random tensor split where it is first needed (#6272) @ThierryCantin-Demers
- A remote mode closes after the client's queued work, not the server stream's (#6342) @nathanielsimard
- Device description and measurements: Backend methods in Burn's types, answered by a remote server (#6339) @nathanielsimard
- Migration: Replace memorypoolusage/memorypoolreport with measurememory, memorycapacity with description().maxmemory, performancestats with measure_peaks, and identity with capabilities().properties.identity.
- fix(cubecl): treat an empty tensor as non-overlapping (#6348) @ThierryCantin-Demers
- refactor(fusion): resolve a collective's members through SpawnedCall (#6349) @ThierryCantin-Demers
- perf(flex): vectorize f32 ln, tanh, erf, gelu and gelu_backward (#6341) @antimora
- docs: correct API descriptions and examples (#6361) @Mikyx-1
- test(backend): fix device description assertions for WGPU (#6366) @laggui
- fix(cubecl): preserve compile statistics across tuning passes (#6367) @laggui
- feat(attention)!: add sliding-window masking (#6259) @gzsombor
- Migration: Add sliding_window: None to AttentionModuleOptions literals, or use ..Default::default(). Some(0) is rejected.
- perf(cubecl): respect memory order in comparison and mask fill (#6331) @EthanAlmloff
- fix(nn): support asymmetric Same padding in Conv3d (#6289) @michele-xilo
- perf(flex): vectorize f32 log1p, atanh, log_sigmoid and its backward (#6345) @antimora
- ComputeEnvironment: a device's compiled kernels and autotune answers, wherever it runs (#6335) @nathanielsimard
- feat!: Device::metal() is cubecl's Metal; sliding-window attention (#6333) @louisfd
- perf(flex): vectorize clamp, sign and integer powi (#6351) @antimora
- feat(group): sharding rules for attention and layout ops (#6372) @ThierryCantin-Demers
- perf(flex): vectorize f32 sin, cos and tan (#6347) @antimora
- feat(optim): train a split model as a pipeline with GPipe or 1F1B (#6340) @ThierryCantin-Demers
- Migration: Signals used for pipeline training derive AutodiffSignal. Learner integration is not included.
- perf(flex): vectorize f32 atan, asin and acos (#6352) @antimora
- chore: bump cubek to 8bfd608 and cubecl to d88b0fe (#6378) @SamuelBelanger
- ComputeEnvironment::merge: bring another environment's entries in (#6373) @nathanielsimard
- feat(random)!: introduce explicit per-operation random keys (#6371) @laggui
- Migration: Operations now reserve a RandomKey when requested; reseeding does not change already queued operations. Seeded sequences change. Backend implementors must provide nextrandomkey and accept a key in random-operation methods. Implicit random operations during graph capture are unsupported; supply explicit keys.
- perf(flex): add a two-input SIMD driver for atan2, hypot and backward ops (#6353) @antimora
- perf(cubecl): F32 unit convolution, im2col gather, and split depthwise wgrad in conv autotune (#6048) @znicelya
- perf(cubecl): autotune folded vs copy for sum_dims (#6376) @EthanAlmloff
- ci: cancel CI run when a PR is merged or closed (#6385) @laggui
- refactor(shard): rename burn-group to burn-shard (#6386) @ThierryCantin-Demers
- Migration: Replace the group feature and burn-group crate with shard and burn-shard, and Device::groupoptions with Device::shardoptions.
- fix(dispatch): use the target's bool storage in cross-backend booltodevice (#6392) @Jannik0
- feat(shard): sharding rules for every elementwise, reduce and along-dim op (#6387) @ThierryCantin-Demers
- docs: correct core and RMSProp API documentation (#6359) @Mikyx-1
- perf(flex): allocate zeros and repeat_dim output without a realigning copy (#6384) @antimora
- Bump cubek to cf74e11 and cubecl to 15135ee (#6398) @nathanielsimard
- feat(shard): run backend-extension custom ops on a sharded compute device (#6395) @ThierryCantin-Demers
- perf(dispatch): forward quantized argmax, argmin, gather and dynamic quantize (#6383) @antimora
- feat(derive): support named fields in enum Module variants (#6388) @vincentmasse
- feat(shard): load records into split params (#6397) @ThierryCantin-Demers
- feat(tensor): support smaller gather/scatter indices on non-indexed dimensions (#6381) @HarpeLm
- chore: cubek at main 2014d34; burn-vision test cast fix (#6399) @louisfd
- feat(train): add regression metrics (MSE, MAE, R2Score) (#6390) @divakantpandey
- feat(shard)!: split quantized tensors between their quantization blocks (#6396) @ThierryCantin-Demers
- Migration: Quantized splits must preserve whole quantization blocks and packed words.
- fix(ci): install Rust in the valgrind job and scope it to the CPU crates (#6380) @glaziermag
- fix(cubecl): update CubeCL and CubeK to fix Vulkan atom
v0.23.0-pre.1预发布2026-10-29
What's Changed
- chore: bump cubek to 83e2c81, back to git cubecl after the 0.22.0 release (#5988) @louisfd
- fix(fusion): keep an indexed op's output as its block's reference (#5991) @nathanielsimard - also released in 0.22.1.
- chore: update cubecl to 9f6bb84 and cubek to 4405c35 (#5993) @louisfd
- fix(fusion): a transaction returns a failed op's error instead of panicking (#5986) @ThierryCantin-Demers
- perf(remote): read a transaction's tensors in one request (#5983) @ThierryCantin-Demers
- feat(cubecl): add a col2im path and autotune for conv_transpose3d (#5793) @vboussot
- fix(module): clarify derive field handling and suggest #[module(skip)] (#5997) @laggui - also released in 0.22.1.
- chore: bump cubecl to 98652370 (parallel compilation) and cubek to match (#5996) @nathanielsimard
- feat(remote): replace a device whose server restarted (#5951) @ThierryCantin-Demers
- Run wasm static constructors once in web examples (#5998) @haydenflinner
- fix(fusion): register uploads as materialized instead of queuing an Init (#5970) @saiyambharara
- fix(derive): preserve generic submodules with primitive type arguments (#6000) @laggui - also released in 0.22.1.
- fix(train): ignore CER padding by token value (#5945) @Mikyx-1
- fix(train): validate F-beta and default to F1 (#5965) @Mikyx-1
- fix(vision): call the CPU connected components directly in the cube backend (#5908) @saiyambharara
- perf(remote): copy large tensors less when sending (#5989) @ThierryCantin-Demers
- chore!: remove deprecated ndarray backend (#5999) @laggui
- feat(remote)!: send messages of any size in 1 MiB frames (#6002) @ThierryCantin-Demers
- chore: bump cubek to 4871781 and cubecl to f508ec57 (#6008) @louisfd
- chore: bump cubek to 7a887e8 (#6011) @louisfd
- fix(cubecl): accumulate half col2im in f32 (#5963) @onenewcode
- chore: clean up references left after the ndarray removal (#6013) @antimora
- feat: expose persistence feature for CubeCL backends (#6012) @laggui - also released in 0.22.1.
- feat(pack): make reader size limits configurable (#6007) @Charles23R
- fix(vision): restore accelerated connected components (#6003) @laggui
- chore!: remove deprecated libtorch backend (#6009) @laggui
- fix(router): forward ctcloss and ctcloss_backward as single operations (#6001) @khimaros
- Chore/cubecl execution (#6015) @nathanielsimard
- feat(tensor): add 3D pooling (avgpool3d, maxpool3d) (#5801) @Sadik00789
- chore: bump cubek to 369cbff (#6020) @louisfd
- feat(capture): add scope input and output helpers (#5990) @Sadik00789
- feat(tensor): add round_to for rounding to a number of decimals (#5842) @ax1s-x1zz
- feat(train): add Matthews correlation coefficient metric (#5818) @Mikyx-1
- feat(quant)!: support every symmetric scheme on Flex, FP8 and FP4 included (#6004) @ThierryCantin-Demers
- docs: add agent guidance and AI disclosure policy (#6021) @laggui
- fix(vision): initialize CPU NMS mask buffer (#6019) @onenewcode
- feat(remote)!: support quantized tensors on the remote backend (#6010) @ThierryCantin-Demers
- docs: remove review notice from PR template (#6022) @laggui
- perf(remote): reuse message buffers across messages (#6017) @ThierryCantin-Demers
- fix(nn): account for dilation in max pooling same padding (#6023) @laggui
- refactor(quant): use CubeCL's scheme axis methods, float value check and minifloat codecs (#6024) @ThierryCantin-Demers
- chore: bump cubek to 3423b49 (#6033) @louisfd
- chore: bump cubek to 813ead4 (#6032) @louisfd
- chore: bump cubek to 84977b4 (#6043) @louisfd
- chore: bump cubecl to 92f9afe, and cubek to b0c6d1c (#6050) @nathanielsimard
- perf(fusion): a reduce-broadcasted fuser with nothing to undo skips its reset (#6036) @louisfd
- fix: clarify tensor container type mismatch panics (#5971) @tandede
- fix(nn): validate binary cross entropy probabilities and targets (#5969) @Mikyx-1
- fix(nn): train and persist stateful PWFF activations (#5932) @Mikyx-1
- ci: lower stale-pr workflow permission to contents: read (#6040) @Fr3ya
- fix(train): handle WER sequence lengths (#6028) @onenewcode
- feat(tensor)!: support all indexing update ops for bool scatter and select_assign (#6035) @mattisonchao
- chore: bump cubek to a680b70 (#6060) @louisfd
- chore: bump cubek to 6424d4e (#6061) @louisfd
- fix(nn): return zero attention for fully masked rows (#6039) @Mikyx-1
- fix(cubecl): support Flex32 tensor data (#6056) @onenewcode
- feat(store): load PyTorch checkpoints from bytes (#5755) @superroket169
- fix: preserve Flex32 dtype in TensorData conversions (#6062) @laggui
- test(fusion): cover singleton select with wide queued operations (#6052) @lorenzozanee
- fix(docs): enable branches std workaround and repair optional API links (#6016) @laggui - also released in 0.22.1.
- chore: bump cubek to 612e30b ([#6064](https://github.com/tracel-a
v0.22.12026-10-20
What's Changed
- fix(fusion): keep an indexed op's output as its block's reference (#5991) @nathanielsimard
- fix(module): clarify derive field handling and suggest #[module(skip)] (#5997) @laggui
- fix(derive): preserve generic submodules with primitive type arguments (#6000) @laggui
- feat: expose persistence feature for CubeCL backends (#6012) @laggui
- fix(docs): enable branches std workaround and repair optional API links (#6016) @laggui
- fix(dataset): enable branches std workaround for all sqlite builds (#6092) @getong
- fix(deps): update rustls to 0.23.46 (#6070) @laggui
- docs(wasm): explain constructor overhead and explicit startup initialization (#6078) @laggui
- fix(deps): update zip to 9.0.4 (#6096) @laggui
- fix(fusion): check binding limit for the first operation (#6053) @abroy77
- chore(deps): update CubeCL to 0.11.1 and CubeK to 0.3.1 @laggui
v0.22.02026-10-06
Summary
Burn 0.22.0 brings five months of improvements to training and inference, along with our biggest API update yet. Over the last four years, we've kept APIs stable where possible while collecting your feedback on what could be improved. This release brings Burn's API much closer to what we want for 1.0.
The biggest change is that models and tensors no longer carry a backend generic. Devices select where and how they run, and editing a model requires much less recompilation. The release also adds LoRA and QLoRA support, parameter groups and multiple optimizers, graph capture, and improvements to remote execution. New tensor operations, optimizers, and kernel improvements round out the release.
For more details, check out the release post on our website.
No More B: Backend
Burn is still built around the Backend trait, with composable support for autodiff, kernel fusion, and remote execution. User code now selects these capabilities through Device, while models are plain types:
``rust
use burn::{
module::Module,
nn::{Linear, LinearConfig},
tensor::Device,
};
[derive(Module, Debug)]
pub struct Model {
linear: Linear,
}
// Requires the cuda feature. Other options include Device::wgpu(..) and Device::flex().
let device = Device::cuda(0);
let model = Model {
linear: LinearConfig::new(4, 2).init(&device),
};
`
More of the infrastructure is now implemented in Rust: Pliron replaces the MLIR-based intermediate representation, and Turso replaces the bundled SQLite dependency. CubeCL also adds LLVM-based CUDA and AMD GPU compilation paths. These changes reduce reliance on bundled C and C++ components and make more of the stack accessible to Rust contributors, though LLVM remains a native dependency for the backends that use it. Clean builds can take longer even as model-edit rebuilds become much faster.
Changelog
Breaking changes and migration
See Migrating to Burn 0.22 in the Burn Book for the complete migration guide, including before-and-after examples for devices, autodiff, modules, training, datasets, tensor operations, and custom integrations.
Start by removing backend parameters such as Model<B> and Tensor<B, D>, selecting a Device, and enabling autodiff with device.autodiff() before initializing a training model and its inputs. Candle has been removed in this release, and NdArray and LibTorch are being deprecated.
Records now use burnpack. Legacy MessagePack, binary, and JSON recorder files must be loaded with an older compatible Burn version and exported through burn-store before importing the weights into 0.22. Follow the checkpoint migration instructions; this transfers model parameters, not legacy optimizer or scheduler state.
What's Changed
Tensor & Modules
- [Breaking] Remove Tensor backend generic and add high-level Device struct (#4717) @laggui
- Refactor tensor kind traits (#4957) @laggui
- refactor(tensor): add BridgeTensor to bridge high-level tensor API with dispatch (#4958) @laggui
- Bool tensor API improvements (#4955) @Cielbird
- fix(nn): conv1d initializer fan out (#4973) @laggui
- feat(ops): autodiff for rfft/irfft (#4956) @cofinite
- feat: add Calibration::AbsMean for BitNet b1.58 ternary weight quantization (#4989) @simeon-kepp
- refactor(tensor)!: replace TensorKind::id() with const KIND and rename TensorKindId -> Kind (#5018) @laggui
- refactor(tensor): seal TensorKind and Parameter traits and consolidate param impls (#5022) @laggui
- fix(module): clearer error when generic used in both module and skip fields (#5028) @jaweed3
- fix(tensor): detect NaN element-wise in contains_nan to avoid f16 false positives (#5027) @zhan-wei-919
- fix(quantization): fallback (dequant -> op -> quant) implementation for slice, gather, select and expand (#5020) @Andy2887
- feat(nn): add rotary encoding reset (#5042) @nicolaslara
- feat(module): add Identity Module, extend Activation and Normalization. (#5058) @crutcher
- feat(nn): add MultiHeadAttention configuration flags for Linear::bias. (#5059) @crutcher
- fix(param): cloning shares lazy initialization state (#5045) @laggui
- fix(tensor): prevent unit dim strides from corrupting split_strides output (#5071) @ArthurBrussee
- feat(tensor): hypot function (#5065) @skewballfox
- feat(module): param group (#5086) @Charles23R
- fix(tensor): resolve unsupported bool storage to device default (#5094) @yasumorishima
- feat(autodiff): implement prod and prod_dim (#5106) @leonardwetzel
- Implement intscatternd for autodiff backend (#5114) @weiji14
- Feat/lora qlora (#5139) @Charles23R
- Feat/spread param groups (#5154) @Charles23R
- LstmState: Clone, Debug, initial, shape, stack, slice, (un)squeeze (#5167) @crutcher
- Feat/relu6 activation (#5143) @Bellman281
- feat: add hardtanh and tanhshrink activation functions (#5144) @Bellman281
- feat: add threshold activation function (#5145) @Bellman281
- feat: add margin ranking loss (#5151) @Bellman281
- feat: add HingeEmbeddingLoss (#5174) @Bellman281
- feat: add soft margin loss (#5149) @Bellman281
- feat: add RReLU activation module (#5150) @Bellman281
- feat: add Mish, SiLU and LogSigmoid activation modules (#5183) @Bellman281
- fix: compute margin^p without std-only f64::powi (no_std build) (#5176) @Bellman281
- Add LstmState::chunk method (#5178) @jaweed3
- feat: add CosineSimilarity module (#5186) @Bellman281
- feat: add PairwiseDistance module (#5185) @Bellman281
- feat: add TripletMarginLoss (#5175) @Bellman281
- feat: add GaussianNLLLoss (#5182) @Bellman281
- feat: add PixelShuffle and PixelUnshuffle modules (#5184) @Bellman281
- feat: support negative GLU dimensions (#5203) @mattisonchao
- fix(autodiff): zero-safe cumprod gradient (#5141) @AnayGarodia
- feat: support negative softmax dimensions (#5205) @mattisonchao
- Fix norm accumulation (#5211) @nathanielsimard
- feat: support negative cumulative dimensions (#5213) @mattisonchao
- feat: support negative FFT dimensions (#5214) @mattisonchao
- feat: support negative sort and top-k dimensions (#5215) @mattisonchao
- feat: support negative dimensions in statistics and norms (#5225) @mattisonchao
- feat: Tensor<D, Int>::square() support (#5224) @crutcher
- feat: support negative dimensions across tensor APIs (#5226) @mattisonchao
- fix(autodiff): fix deadlock when a Backward step runs a nested backward (#5194) @laurigates
- refactor(tensor): make elem comparison methods aliases to unify scalar methods (#5230) @laggui
- fix(tensor): preserve dimension check errors (#5232) @mattisonchao
- feat(tensor): add mask_select (boolean mask indexing) default impl (#5238) @Yashiru
- feat(burn-nn): support negative dimensions (#5241) @mattisonchao
- feat: add Tensor::empty_like (#5242) @crutcher
- feat(tensor): add extract method; simplify inplace implementation. (#5207) @crutcher
- refactor(burn-tensor): remove duplicate dimension checks (#5243) @mattisonchao
- feat(tensor): add tensor.select_dim(dim, index) (#5246) @crutcher
- feat(nn): add fold4d / Fold4d module (inverse of unfold4d) (#5173) @Bellman281
- feat(tensor): add QR decomposition (#5102) @anagaev
- feat(quant): support UE4M3 scale params end to end on CPU (#5253) @ThierryCantin-Demers
- fix(quant): round quantization scales up instead of to nearest (#5261) @laggui
- fix(tensor): TensorData convert to bool stores by truthiness (#5269) @SamuelBelanger
- fix(tests): skip some qr tests in f16 (#5272) @laggui
- feat(nn): add AdaptiveAvgPool3d module (#5115) @jaweed3
- fix(tensor): topk check for k <= shape[dim]` (#5307) @laggui
- test(burn-tensor): run the doc examples instead of only compiling them (#5302) @4ktLuffy
- Feat/autodi
v0.22.0-pre.4预发布2026-09-22
What's Changed
- fix(cubecl): restrict GEMV CPU autotune priority to 1D vector workloads (#5423) @Sadik00789
- fix(store): abort instead of double-dropping when a mapper unwinds (#5488) @antimora
- Chore/bump cubecl cubek revs (#5497) @nathanielsimard
- fix(deps): restore windows dependency compatibility in lockfile (#5499) @laggui
- fix(optim): keep tensor data in optimizer records (#5407) @original4422
- docs(pack): clarify tensor thread-safety contract (#5500) @laggui
- chore(deps): update cubecl + cubek to fix fma sigsev (#5501) @ThierryCantin-Demers
- fix(store): preserve extensionless burnpack paths (#5494) @rioyu123
- feat(optim): add LAMB optimizer (#5495) @Mikyx-1
- fix(store): respect PyTorch tensor strides (#5392) @original4422
- refactor(tensor): move padding operations to backend (#5505) @laggui
- feat(tensor): support mul indexing updates on NdArray and Flex (#5325) @mattisonchao
- feat(module): generalize Param with module-owned flags (#5498) @laggui
- refactor(cubecl): interpolate autotuning with cubek strategies and roofline bounds (#5502) @SamuelBelanger
- fix(router): support rfft and irfft (#5513) @Mikyx-1
- fix(module): keep the param mapper across valid() and from_inner (#5509) @nathanielsimard
- feat(tch): support mul indexing updates (#5511) @mattisonchao
- Update/cube (#5518) @louisfd
- feat(cubecl): support mul indexing updates (#5512) @mattisonchao
- test(quantization): strengthen quantized layout coverage (#5503) @Mikyx-1
- test(cubecl): rename indexing tests to reflect reference matching (#5519) @laggui
- fix(train): aggregate Dice statistics across batches (#5515) @Mikyx-1
- fix(train): return final ROUGE-L value (#5517) @Mikyx-1
- Refactor/cubecl runtimes (#5528) @nathanielsimard
- refactor(backend): remove specialized indexing add operations (#5523) @laggui
- fix(store): exclude adapter-matched tensors from unused (#5536) @apoorvdarshan
- chore: deprecate burn-tch backend (#5525) @antimora
- feat(autodiff): implement topk backward (#5531) @Mikyx-1
- fix(store): return deserialization error instead of panicking in nested Deserializer (#5496) @Sadik00789
- fix(autodiff): zero-safe prod gradients (#5534) @Mikyx-1
- feat(tensor): support assign indexing updates across backends (#5532) @mattisonchao
- perf(cubecl): offer Gemm on CPU for general matmuls (#5538) @ThierryCantin-Demers
- fix(fusion): a panicking operation must not poison its stream (#5535) @nathanielsimard
- fix(pack): validate size from aligned data offset (#5530) @Mikyx-1
- chore(deps): follow cubecl's collapsed memory throughput modes (#5510) @ThierryCantin-Demers
- fix(no-std): use shared sync primitives across crates (#5543) @laggui
- fix(store): write safetensors files atomically (#5489) @antimora
- refactor(dispatch): unify routing and strengthen autodiff contract (#5520) @laggui
- chore(deps): reduce unnecessary dependencies (#5544) @nathanielsimard
- fix(autodiff): prod backward broadcasting (#5547) @laggui
- feat(tensor): add batched SVD decomposition to linalg (#5259) @sehaxe
- fix(store): reject a loaded tensor whose dtype is the wrong kind (#5490) @antimora
- fix(dispatch): restore autodiff context promotion (#5551) @laggui
- Refactor/fusion write scope (#5540) @nathanielsimard
- fix(ndarray): preserve SIMD unary layout and recip precision (#5553) @laggui
- feat(module): separate gradient control from module freezing (#5537) @laggui
- feat(backend)!: support asymmetric padding in conv1d and conv2d (#5521) @laggui
- fix(tensor): validate matmul batch broadcast in TensorCheck (#5555) @ax1s-x1zz
- feat(tensor): replace no_grad with explicit autodiff conversions (#5557) @laggui
- docs(tensor): fix unfold window formula (#5559) @Mikyx-1
- perf(conv): accumulate direct convolution channels in vector registers on CPU (#5545) @ThierryCantin-Demers
- chore(deps): update cubecl and cubek for fallible throughput probes (#5561) @ThierryCantin-Demers
- Chore/update cubecl runtime erasure (#5556) @nathanielsimard
- fix(store): reject invalid path filter regex (#5558) @Mikyx-1
- feat(tensor)!: add multi-axis vector norm variants and update empty maxabsdims semantics (#5539) @Sadik00789
- feat(tensor): add assertshape! and debugassert_shape! macros (#5554) @antimora
- feat(tensor): apply TensorCheck to remainder, powi, powf, hypot, atan2 (#5564) @ax1s-x1zz
- fix(dispatch): decouple CubeCL runtime facade crates (#5570) @laggui
- fix(nn): exclude pad tokens from cross-entropy normalization (#5569) @Mikyx-1
- feat(tensor): add isautodiff and istracked state inspection (#5571) @laggui
- chore: update cubecl and cubek revs (#5586) @nathanielsimard
- feat(tensor): validate matmul rank in TensorCheck (#5580) @ax1s-x1zz
- feat(cubecl): support AdaptiveAvgPool3d (#5372) @jcwal1516
- fix(rl): preserve deterministic mode in async batches (#5574) @Ultronen
- fix(pack): validate tensor byte lengths when reading (#5576) @Mikyx-1
- feat(linalg)!: extract tensor linalg into burn-linalg extension crate (#5572) @laggui
- fix(train): exclude padded samples from accuracy aggregation (#5578) @Mikyx-1
- fix(optim): keep a parameter's checkpointing strategy across an update (#5618) @Marc-AnthonyG
- perf(fusion): let a padded tensor vote for the block's layout (#5620) @Marc-AnthonyG
- perf(fusion): settle only the unfusable head of a block (#5622) @Marc-AnthonyG
- feat(cubecl): implement integer powi operations (#5616) @laggui
- test(backend): cover empty-axis autodiff reductions (#5598) @lorenzozanee
- docs(flex): fix stale statements in burn-flex docs and comments (#5619) @7487
- perf(flex): write slice_assign in place when the destination is uniquely owned (#5603) @hdimer
- Feat/storage tiled carrier (#5631) @louisfd
- test(fusion): change f32 expected value to oracle (#5633) @laggui
- perf(cubecl): scatter-add runs one unit per value with atomic adds (#5621) @Marc-AnthonyG
- fix(nn): honor countincludepad for asymmetric average pooling (#5592) @DivyamTalwar
- perf(autodiff): reduce a broadcast gradient over all dims at once (#5623) @Marc-AnthonyG
- fix(cubecl): gate storage_tiled tests behind runtime features (#5635) @laggui
- fix(tensor): avoid cosine similarity denominator underflow (#5585) @Mikyx-1
- perf(flex): optimize views, copies, in-place ops, and Rayon parallelism (#5613) (#5617) @Sadik00789
- refactor(dataset): back SqliteDataset with Turso instead of rusqlite (#5546) @antimora
- perf(cubecl): walk elementwise kernels in operands' memory order (#5625) @Marc-AnthonyG
- feat(autodiff): support graph-preserving cross-backend transfers (#5624) @laggui
- fix(flex): avoid overflow in boolean select updates (#5629) @Ultronen
- test(burn-std): import vec! macro in layout.rs tests for no-std (#5639) @ax1s-x1zz
- fix(flex): support unsigned dtypes in intargmax/intargmin (#5630) @Punisheroot
- fix(store): harden and restructure the PyTorch reader (#5593) @antimora
- fix(flex): guard sum fast path with layoutcoversstorage_once (#5634) @antimora
- test(backend): cover empty-axis autodiff product reductions (#5641) @lorenzozanee
- fix(linalg): add autotune feature propagation (#5648) @laggui
- fix(autodiff)!: retain input nodes until child registration (#5647) @laggui
- refactor(cubecl): call cubek's direct convolution routine (#5646) @ThierryCantin-Demers
- fix(autodiff): explicitly reject consumed graph reuse and preserve reusable leaves (#5645) @laggui
- fix(cubecl): update cubek to fix sums over overlapping views (#5654) @laggui
- feat(tensor): implement Min and Max scatter/select_assign across backends (#5582) @ax1s-x1zz
- fix(flex): validate gathernd and scatternd coordinates (#5640) @stack3mpty
- ci: reduce redundant compilation in macOS tests (#5669) @laggui
- fix(flex): round nearest grid_sample ties to even (#5663) @yuefdev
- fix(burn-dataset): cap MNIST item counts at the split size (#5667) @li-jin-quan
- fix(flex): make u64 right shift logi
v0.22.0-pre.3预发布2026-08-25
What's Changed
- feat(vision): add color conversion and blurring transforms (#5339) @Charles23R
- chore!: remove deprecated burn-candle backend (#5343) @antimora
- chore: deprecate burn-ndarray backend (#5344) @antimora
- fix(reduce): return the identity for a zero-length axis, and reject the extrema (#5333) @robertomeroni
- Migrate to pliron (#5324) @wingertge
- fix(burn-cubecl): broadcast a size-1 dim against a zero-sized dim (#5335) @Yashiru
- refactor(nn): add functional batch_norm forward operation (#5347) @laggui
- fix(tests): batch_norm f16 tol (#5348) @laggui
- fix(ndarray): avoid invalidating in-flight handles in UnsafeSharedRef (#5346) @robertomeroni
- fix(tests): flex simd and rayon feature graph (#5350) @laggui
- Bump cubecl and cubek revs for the pliron codegen fixes (#5355) @nathanielsimard
- fix(flex): replace all remaining cases of function pointer passing (#5358) @laundmo
- fix(flex): make float_sign branchless so it compiles on Xtensa (#5331) @Bellman281
- perf(flex): reduce int cast codegen size (#5357) @laundmo
- chore: simplify cargo run-checks local validation (#5356) @laggui
- fix(dispatch): preserve autodiff device for non-float tensors (#5340) @tianrking
- fix(module): build LoRA factors under a persistent-allocation window (#5362) @nathanielsimard
- fix(module): build LoRA factors at an explicit dtype over a packed base (#5364) @nathanielsimard
- fix(module): preserve LoRA factor dtype when composing weights (#5365) @laggui
- fix(burn-tch): preserve parent storage through permute/swap_dims (#5376) @andoriyu
- perf(flex): collapse both operand layouts into a joint loop nest for broadcast binary ops (#5123) @Andy2887
- perf(flex): pooling impl optimization by rewriting inner kernel loop (#5361) @laundmo
- feat(tensor)!: expand TensorData conversion and access APIs (#5316) @crutcher @laggui
- fix(deps): update h2 transitive dep (#5381) @laggui
- fix(tensor): preserve dtype in padding operations (#5386) @laggui
- feat(quant)!: support two-level quantization scales (#5262) @ThierryCantin-Demers
- Update cube (#5389) @louisfd
- chore(ci): pin the shared actions to v11 (#5390) @ThierryCantin-Demers
- chore(ci): pin the publish workflow to v11 (#5391) @ThierryCantin-Demers
- feat(capture): add graph capture backend producing GraphIr (#5377) @laggui
- fix(fusion): reject a padded reference layout (#5395) @ThierryCantin-Demers
- chore: remove stale comment in root Cargo.toml (#5397) @ThierryCantin-Demers
- chore: tracel github actions v11 (#5398) @syl20bnr
- fix(flex): preserve non-finite padding semantics in conv (#5394) @tandede
- chore: fix clippy lints (#5401) @laggui
- chore(deps): update cubecl + cubek (#5403) @ThierryCantin-Demers
- feat(pack): stream tensors on demand when writing burnpack files (#5349) @antimora
- chore: update to xtask v5 (#5404) @syl20bnr
- fix!: address fusion and autodiff edge cases (#5400) @Charles23R @laggui @nathanielsimard
- perf(cubecl): reduce, don't pool, for a 1x1 adaptive average pool (#5405) @nathanielsimard
- fix(capture): preserve initializers across capture scopes (#5408) @laggui
- test(capture): update cross-device tensor movement contract (#5409) @laggui
- fix(metal): update cubecl rev for MSL capability detection (#5396) @laggui
- fix(nn): use mean reduction in group norm (#5410) @laggui
- Perf/fusion layout propagation (#5406) @nathanielsimard
- refactor(burn): route backend features through the dispatch chain (#5369) @laurigates
- fix(tests): correct FFT fixture and linalg tolerances (#5415) @laggui
- fix(vision): keep even filter2d output size (#5414) @Soundcreates
- fix(tensor): prevent softplus from overflowing to inf (#5374) @Mikyx-1
- Update/cube (#5420) @louisfd
- fix(cubecl): adapt matmul integration to cubek changes (#5421) @laggui
- perf(cubecl): compute a depthwise weight gradient in one kernel (#5422) @nathanielsimard
- perf(fusion): let a concatenation choose its own layout (#5417) @nathanielsimard
- perf(cubecl): cut a pointwise weight gradient's contraction (#5424) @nathanielsimard
- fix(tensor): validate TensorData byte length on deserialization (#5360) @robertomeroni
- chore: fix removed import (#5427) @laggui
- Let a caller install and read a device's memory pools (#5425) @nathanielsimard
- perf(conv): route strided pointwise convolutions through the matmul path (#5429) @ThierryCantin-Demers
- perf(cubecl): compute a dense weight gradient over the input's columns (#5428) @nathanielsimard
- refactor(store)!: replace TensorSnapshot with burn_pack::Tensor (#5411) @antimora
v0.22.0-pre.2预发布2026-08-10
What's Changed
- feat(tensor): add tensor.select_dim(dim, index) (#5246) @crutcher
- feat(nn): add fold4d / Fold4d module (inverse of unfold4d) (#5173) @Bellman281
- Update to new cubecl environment (#5251) @nathanielsimard
- fix(docs): correct LBFGSConfig::init doc comment (#5256) @Mikyx-1
- feat(tensor): add QR decomposition (#5102) @anagaev
- feat(fusion): custom fusion optimization (#5240) @nathanielsimard
- feat(quant): support UE4M3 scale params end to end on CPU (#5253) @ThierryCantin-Demers
- fix(burn-cubecl): fix cubek double buffering matmul (#5252) @laggui
- Update revs (#5265) @nathanielsimard
- fix(quant): round quantization scales up instead of to nearest (#5261) @laggui
- fix(tensor): TensorData convert to bool stores by truthiness (#5269) @SamuelBelanger
- refactor(dataset)!: replace Vec<PixelDepth> with PixelData (#5271) @Charles23R
- fix(tests): skip some qr tests in f16 (#5272) @laggui
- feat(burn-cubecl): max/mindimwith_indices in a single launch (#5273) @ThierryCantin-Demers
- update cube (#5275) @louisfd
- Fix: wgpu fused reduce broadcast produced wrong values (#5268) @Charles23R
- Fix/fusion read composition (#5282) @nathanielsimard
- docs(book): remove backend generics, update device, learner, module and add optimizer section (#5276) @laggui
- feat(ndarray): support assign indexing updates for floats and ints (#5245) @mattisonchao
- feat(backend): promote mask_select to a backend op with dispatch (#5283) @Yashiru
- fix(fusion): decline to fuse unsupported quant scale params (#5279) @ThierryCantin-Demers
- feat(nn): add AdaptiveAvgPool3d module (#5115) @jaweed3
- fix(cubecl): use real outchannels in convtranspose2d autotune key (#5289) @SamuelBelanger
- refactor(tests): add flex features to enable simd or rayon, disable allocation tracking (nicer output) (#5285) @laundmo
- perf(flex): precompute interpolation axis taps (#5274) @huahuadeliaoliao
- chore: update cubek rev w/ matmul fixes (#5291) @laggui
- feat(autotune): centralize roofline bounds registration for matmul, reduce, and attention (#5188) @ThierryCantin-Demers @SamuelBelanger
- update cube (#5299) @louisfd
- fix(dispatch): remove incorrect checkpointing debug assertion in grad_replace (#5294) @4ktLuffy
- fix(docs): correct tensor sort doc examples in orderable.rs (#5298) @4ktLuffy
- fix(docs): correct chained reduction doc examples in numeric.rs (#5301) @4ktLuffy
- fix(xtask): apply the webgpu feature on the wgpu CI runner (#5300) @4ktLuffy
- chore(deps): update cubecl and cubek for BlockLevel::BlockTensor (unimplemented) (#5303) @ThierryCantin-Demers
- fix(cubecl): update rev for constant bitcasts fix (#5306) @laggui
- fix(tensor): topk check for k <= shape[dim] (#5307) @laggui
- test(burn-tensor): run the doc examples instead of only compiling them (#5302) @4ktLuffy
- perf(flex): improve addbias and convplane_accumulate autovectorization (#5267) @laundmo
- fix(burn-tch): panic broadcasting a zero-sized dimension on the tch backend (#5305) @hdimer
- Change visibility of optimizer (#5314) @nathanielsimard
- update cubecl/cubek (#5315) @ThierryCantin-Demers
- fix(cubecl): add missing device throughput on rocm and cpu (#5312) @ThierryCantin-Demers
- Feat/autodiff quantized ops (#5317) @nathanielsimard
- Keep metric items on their device instead of syncing them to the host (#5319) @nathanielsimard
- feat(module): generalize weight reparameterization abstraction (#5311) @laggui
- fix(cubecl): allow metadata-only reshape of sub-byte quantized tensors (#5321) @ThierryCantin-Demers
- update cube (#5322) @louisfd
- fix(dispatch): keep a WgpuDevice conversion when wgpu features unify (#5323) @ThierryCantin-Demers
- fix(deps): update cubecl and use correct windows crate versions (#5327) @laggui
- fix(extension): dispatch autodiff ops to the correct backend (#5326) @laggui
- fix: correct some copy-pasta mistakes (#5329) @laggui
- feat(module): add record param group in the collector and allow loading unused params (#5336) @nathanielsimard
- fix(quant): dequantize transposed quantized tensor (#5281) @subotac
- fix(tensor)!: standardize NaN propagation in extrema reductions (#5290) @jcwal1516
- fix(train): flush async metrics before checkpoint/early-stop (#5320) @TsaoLun
- chore: bump to version 0.22.0-pre.2 (#5338) @laggui
v0.22.0-pre.1预发布2026-07-29
What's Changed
- Bump version to 0.22.0-pre.1 (#4933) @laggui
- Refactor interpolate from cubek (#4928) @SamuelBelanger
- Combined PRs (#4944) @github-actions[bot]
- Add A-FINE image quality metric (#4894) @Capataina
- Cubek-pool integration (#4948) @SamuelBelanger
- Make RL event types mod public (#4951) @laggui
- [Breaking] Remove Tensor backend generic and add high-level Device struct (#4717) @laggui
- Feature gate the backend ops extension when no backend feature is enabled (#4953) @laggui
- Refactor/isolate burn backend deps (#4954) @nathanielsimard @laggui
- Refactor tensor kind traits (#4957) @laggui
- feat(metric): add BLEU score training metric (#4937) @kimjune01
- refactor(tensor): add BridgeTensor to bridge high-level tensor API with dispatch (#4958) @laggui
- Bool tensor API improvements (#4955) @Cielbird
- Re-export BurnConfig with fusion/autodiff getters (#4959) @truffle-dev
- refactor(extension): feature gate Tensor::from/intoprimitive and add from/intobridge w/ TensorKindId validation (#4961) @laggui
- burn 0.21 cite (#4969) @Redhawk18
- fix(fusion): shared tensor (#4962) @nathanielsimard
- fix(nn): conv1d initializer fan out (#4973) @laggui
- feat(metric): add ROUGE-L score metric (#4967) @jaweed3
- feat(metric)!: add multiclass and multi-label support to AUROC metric (#4960) @manucouto1
- feat(ops): autodiff for rfft/irfft (#4956) @cofinite
- refactor(cubecl): update to reference changes (#4974) @wingertge
- fix(deps): update enumset to 1.1.13 (#4979) @laggui
- fix(dispatch): Wgpu and WebGpu re-export feature gating (#4981) @laggui
- fix(fusion): resolve tensor into_ir (re-entrancy bug) (#4984) @laggui
- feat(cube): interpolate nearest exact mode (#4982) @SamuelBelanger @louisfd
- fix(features): expose safetensors/pytorch support directly (#4985) @crutcher
- fix(train): guard TUI metric navigation against empty state (#4987) @SAY-5
- fix(doc): correct SgdConfig::init (#4986) @jaweed3
- perf(core)!: improve compile times via opaque inner types to break dependency chain (#4977) @nathanielsimard
- feat(train): add training and evaluation progress logger and add them to the event processors (#4980) @Zatiji
- Update CubeCL & CubeK (#4992) @louisfd
- refactor: use obfuscate from burn-std (#4997) @nathanielsimard
- fix(train): scroll TUI metric tabs to keep selected visible (#4995) @LucaCappelletti94
- feat(dispatch): add remote backend (#4994) @nathanielsimard
- fix(docs): improve error messages with shape/dimension context (#4996) @jaweed3
- feat(train): add mouse support to TUI metric navigation (#4998) @LucaCappelletti94
- refactor(backends)!: remove associated element types & replace with device defaults (#5000) @laggui
- chore(cubek): update to interpolate refactor (#5003) @SamuelBelanger
- fix(ndarray): broadcast remainder operands (#5002) @puneetdixit200
- feat(wgpu): use WgpuRuntime compiler generic to enable specialized aliases (#5001) @nathanielsimard
- fix(remote): add remote device settings fetched during client init (#5008) @laggui
- refactor(rl): add inference device and update dqn example (#5009) @Charles23R
- fix(dispatch): use the correct webgpu/vulkan/metal/wgpu device (#5010) @laggui
- refactor(cubecl): add lifetime to View (#4999) @wingertge
- added FloatKind::F64 arm for FuseType implementation (#5011) @Andy2887
- refactor(train)!: transform all Progress items into a global progress struct (#5012) @Zatiji
- feat: add Calibration::AbsMean for BitNet b1.58 ternary weight quantization (#4989) @simeon-kepp
- fix(doc): inconsistent assertion for non-negative (#5016) @YichiZhang0613
- refactor(tensor)!: replace TensorKind::id() with const KIND and rename TensorKindId -> Kind (#5018) @laggui
- fix(flex): maxpool3dbackward indices type (#5017) @laggui
- perf(flex): bulk-copy inner-contiguous run in to_contiguous (#5019) @jkaczman
- fix(train): use recvtimeout instead of tryrecv. (#5021) @jeandudey
- refactor(tensor): seal TensorKind and Parameter traits and consolidate param impls (#5022) @laggui
- fix: include RMS_NORM in normalization layer detection for safetensors adapter (#5023) @ogghead
- fix(module): clearer error when generic used in both module and skip fields (#5028) @jaweed3
- fix(tensor): detect NaN element-wise in contains_nan to avoid f16 false positives (#5027) @zhan-wei-919
- fix(remote): correct multi-streams and drastically improve performance (#5029) @nathanielsimard
- refactor(distributed)!: add DistributedContext and all_reduce to high-level API (#5013) @laggui @Charles23R
- feat(extension): add support for custom output types wrapping tensor primitives (#5030) @laggui
- fix(quantization): fallback (dequant -> op -> quant) implementation for slice, gather, select and expand (#5020) @Andy2887
- fix(store): add .allow_partial(true) hint in TensorNotFound error w/ docs (#5032) @jaweed3
- chore: cleanup remote feature flags (#5034) @laggui
- perf: improve compilation speed with into-scalar (#5037) @nathanielsimard
- feat(nn): add rotary encoding reset (#5042) @nicolaslara
- fix(dep): update aes to 0.9.1 (yanked) (#5047) @laggui
- feat: add missing Device staging and memory cleanup methods (#5048) @laggui
- fix(ci): use flex as default_backend and split jobs into backends, crates, and examples shards with merged lcov report (#5041) @laggui
- fix(ci): remove failciif_error for code coverage (#5055) @laggui
- fix(dataset): fully qualify HuggingFace dataset repo ids (#5050) @ThierryCantin-Demers
- chore(deps): bump actions/download-artifact from 7 to 8 (#5053) @dependabot[bot]
- chore(deps): bump codecov/codecov-action from 6 to 7 (#5054) @dependabot[bot]
- feat(cube): interpolate autotune (#5044) @SamuelBelanger
- fix(example): Device::enumerate configure (#5056) @laggui
- feat(module): add Identity Module, extend Activation and Normalization. (#5058) @crutcher
- feat(fusion): add CubeCL fusion lowering for int bitwise ops (#5057) @iamorlando
- feat(nn): add MultiHeadAttention configuration flags for Linear::bias. (#5059) @crutcher
- Improve compilation speed with into-scalar (#5061) @nathanielsimard
- fix(param): cloning shares lazy initialization state (#5045) @laggui
- feat(extension): support async fn + futures and add Tensor low-level backend primitive interop (#5049) @laggui
- fix: fix inconsistent assertions (#5062) @YichiZhang0613
- Feat/multi device remote (#5036) @nathanielsimard
- perf(ndarray): read select indices from a contiguous slice (#5066) @IvanUkhov
- feat(cubecl): wire logical any/all reductions (#5051) @zhan-wei-919
- perf(ndarray): reshape standard-layout arrays without copying (#5067) @IvanUkhov
- fix(tensor): prevent unit dim strides from corrupting split_strides output (#5071) @ArthurBrussee
- chore: bump MSRV from 1.92 to 1.95 (#5077) @laggui
- fix: forward features flag in burn Cargo.toml for burn-vision (#5078) @Marc-AnthonyG
- chore(deps): update polars to 0.54 (#5072) @getong
- feat(metric): add AUC-PR (Average Precision) training metric (#4963) @manucouto1
- feat(store): extract burnpack format to burn-pack + add minimal record (#5064) @nathanielsimard
- feat(tensor): hypot function (#5065) @skewballfox
- chore(docs): update readme (#5080) @nathanielsimard @laggui
- fix(train): load checkpoint on the correct device (#5084) @laggui
- fix(fusion): use dtypetostorage_type in autotune checks (#5085) @laggui
- fix(data): reuse persistent dataloader workers across epochs (#5073) @manucouto1
- Refactor Record - Serialization & Deserialization of Module, Optimizer & LrScheduler (#5083) @nathanielsimard
- update cube @louisfd
- fix(autotune): feature gate interpolate autotune strategy (#5090) @laggui
- chore(deps): bump actions/checkout from 6 to 7 (#5093) @dependabot[bot]
- feat(autotune): support cpu gemm (#5081) @louisfd
- refactor(backend): move device to TensorMetadata (#5089) @skewballfox
- fix(cubecl): materialize
v0.21.02026-05-07
Summary
Burn 0.21.0 brings 4 months of improvements that make the framework significantly faster and more reliable across the board. The gains span distributed workflows for training large models all the way down to small-model inference, where the reduced framework overhead becomes especially noticeable.
We rethought our distributed computing stack around differentiable collective operations. Kernel selection is now more reliable thanks to better autotuning and a new validation layer, and a project-level burn.toml file lets you tweak those internals (and many others) without recompiling. A reworked device handle reduces framework overhead, and a new burn-dispatch crate simplifies backend selection while paving the way for faster compile times. The release also ships burn-flex, a lightweight eager CPU backend for WebAssembly and embedded targets that replaces burn-ndarray. Finally, we added early off-policy reinforcement learning support and a fresh round of kernel work on GEMV, top-k, and FFT.
For more details, check out the release post on our website.
Changelog
Breaking
We've introduced a couple of breaking changes with this release. The affected areas are detailed in the sections below.
burn-dataset cache directory
To respect platform conventions, we switched from using a hardcoded ~/.cache directory root for downloaded artifacts.
| Platform | Path |
|----------|------|
| Linux | $XDGCACHEHOME or ~/.cache |
| macOS | ~/Library/Caches |
| Windows | {FOLDERPATHLOCALAPPDATA} |
For Linux users without $XDGCACHEHOME configured, this change has no effect. The cache directory is still ~/.cache.
Interface Changes
TensorData::shape now stores a Shape instead of a Vec<usize>. Existing binary records using BinFileRecorder or BinBytesRecorder are no not forward-compatible and must be converted before upgrading.
``rust
static STATEENCODED: &[u8] = includebytes!("model.bin");
let model: Model<B> = Model::new(&Default::default());
// Old format can still be loaded before upgrade, but must be re-saved in a forward-compatible format.
let record = BinBytesRecorder::<FullPrecisionSettings, &'static [u8]>::default()
.load(STATE_ENCODED, &Default::default())
.expect("Failed to decode state");
let model = model.load_record(record);
model.save_file("model.mpk", &NamedMpkFileRecorder::<FullPrecisionSettings>::new()).unwrap();
`
The module derive macro has been improved, and the Ignored<T> wrapper is now deprecated. For fields that should not considered modules, use #[module(skip)] instead.
`diff
pub struct Conv1d<B: Backend> {
- pub padding: Ignored<PaddingConfig1d>,
+ #[module(skip)]
+ pub padding: PaddingConfig1d,
}
`
We added support for explicit asymmetric padding. If you were using explicit padding, you must now specify the same value for all pairs. Note that PaddingConfig3d does not support asymmetric padding yet.
`diff
// Symmetric (left, right)
- PaddingConfig1d::Explicit(1)
+ PaddingConfig1d::Explicit(1, 1)
// Symmetric (top, left, bottom, right)
- PaddingConfig2d::Explicit(1, 1)
+ PaddingConfig2d::Explicit(1, 1, 1, 1)
`
The Gelu activation module can now be configured with tanh approximation. This only affects code that instantiated Gelu directly.
`diff
- let activation = Gelu;
+ let activation = Gelu::new(); // or Gelu::default()
`
The position-wise feed-forward module now has a configurable activation function. To keep it backwards compatible with previously saved records, the field is marked as #[module(skip)].
`diff
[derive(Module, Debug)]
pub struct PositionWiseFeedForward<B: Backend> {
// ...
- /// GELU activation function.
- pub gelu: Gelu,
+ /// Activation function.
+ #[module(skip)]
+ pub activation: Activation<B>,
}
`
The Shape fields are now private and some methods have been renamed. ShapeError has been renamed to MetadataError.
`diff
- let b = tensor.shape().dims[0];
+ let b = tensor.shape()[0]
- if let Err(ShapeError::RankMismatch{...}) = lhs.broadcast(&rhs) {
+ if let Err(MetadataError::RankMismatch{...}) = lhs.broadcast(&rhs) {
- let shape = shape.swap(1, 2).unwrap();
+ let shape = shape.swapped(1, 2).unwrap();
- let shape = shape.permute(&[0, 2, 1, 3]).unwrap();
+ let shape = shape.permuted(&[0, 2, 1, 3]).unwrap();
`
The boolean data type was expanded to include its storage type.
`diff
match bool_tensor.dtype() {
- DType::Bool => todo!(),
+ DType::Bool(BoolStore::Native) => todo!(),
+ DType::Bool(BoolStore::U8) => todo!(),
+ DType::Bool(BoolStore::U32) => todo!(),
_ => unreachable!(),
}
`
powf is no longer supported for Int tensors, as it previously relied on incorrect implicit truncation. These operations are now only available for Float tensors.
`diff
- let tensori = tensorint.powf(tensor_float);
+ let tensorf = tensorint.float().powf(tensor_float);
- let tensori = tensorint.powfscalar(scalarfloat);
+ let tensorf = tensorint.float().powfscalar(scalarfloat);
`
Backend tensor creation and conversion ops now take an explicit output dtype. This removes backend-specific dtype inference and ensures consistent behavior across backends. (Backend implementors only.)
`diff
impl BoolTensorOps<Self> for MyBackend {
- fn bool_empty(shape: Shape, device: &Device<Self>) -> BoolTensor<Self> {
+ fn bool_empty(shape: Shape, device: &Device<Self>, dtype: BoolDType) -> BoolTensor<Self> {
// use dtype instead of inferring internally
}
- fn boolintoint(tensor: BoolTensor<Self>) -> IntTensor<Self> {
+ fn boolintoint(tensor: BoolTensor<Self>, out_dtype: IntDType) -> IntTensor<Self> {
// use dtype instead of inferring internally
}
}
`
Associated types were moved from Backend to BackendTypes. Prefer the type aliases (Device<B>, FloatTensor<B>, etc.) to avoid type resolution issues.
`diff
impl BoolTensorOps<Self> for MyBackend {
- fn bool_empty(shape: Shape, device: &<Self as Backend>::Device, dtype: BoolDType)) -> <Self as Backend>::BoolTensorPrimitive {
+ fn bool_empty(shape: Shape, device: &Device<Self>, dtype: BoolDType) -> BoolTensor<Self> {
}
}
``
Module & Tensor
- Feat/device policy (#4373) @laggui
- Implement basic RNN module (#4460) @aditya0by0
- Add deg2rad and rad2deg (#4462) @softmaximalist
- Implement median tensor operation (#4454) @softmaximalist
- Add Selu activation function (#4439) @antimora
- Add CELU activation function (#4441) @antimora
- Add Elu activation function (#4438) @antimora
- Add BiGru (bidirectional GRU) module (#4442) @antimora
- Add ThresholdedRelu activation function (#4440) @antimora
- Add Softsign activation function (#4437) @antimora
- [Breaking] Add configurable activation and layernormeps to transformer layers (#4410) @antimora
- [Breaking] Add asymmetric padding support for conv and pool operations (#4263) @antimora
- Implement HardShrink, SoftShrink and Shrink Activations (#4556) @aditya0by0
- feat: add align_corners support to InterpolateOptions (#4518) @antimora
- feat: support padding on arbitrary dimensions (#4507) @antimora
- feat: enhance attention() with scale, attnbias, softcap, and iscausal (#4476) @antimora
- feat: Introduce Lanczos3 interpolation method (#4601) @ovr
- Add HannWindow operator to burn-tensor (#4631) @walkinggo
- [Breaking] Remove int powf and make powi numeric op (#4646) @laggui
- [Breaking] Add bool store dtype + remove bool elem from fusion (#4649) @laggui
- [Breaking] Use device settings to provide output dtype (#4653) @laggui
- feat: add categorical sampling for tensors (#4655) @majiayu000
- Add HammingWindow operator to burn-tensor (#4698) @RunjiaChen
- Fix: make module cloning efficient for CPU devices (
v0.21.0-pre.5预发布2026-05-05
What's Changed
- Re-enable fusion f16 conv + bn regression tests (#4920) @laggui
- Enable & fix cubecl tests w/ fusion (#4917) @laggui
- Fusion tests (#4872) @nathanielsimard
- Adding complex to complex FFT implementation (#4903) @RunjiaChen
- Add cubecl integration to topk (#4906) @Sublime12
- Extract float math ops in a new trait (#4891) @skewballfox
- Add ParamId::try_deserialize() (#4881) @crutcher
- Add Clone + 'static bounds to LrScheduler::Record and derive Clone for scheduler records (#4905) @crutcher
- linalg::lu: Improve numerical handling and small perf cleanup (#4902) @softmaximalist
- Add fusion integration for argtopk (#4904) @Sublime12
- Add argtopk for Cubecl backend (#4900) @Sublime12
- Update CubeK: tile matmul refactor (#4901) @louisfd
- Use gathernd in RNN-T gatherloss (#4895) @antimora
- Fix cubecl cross product on non-last dimension (#4850) (#4850) @dschulmeist
- Fix PytorchReader bugs to load legacy files correctly (#4897) @softmaximalist
- Add native impementations for scatternd / gathernd; provide autodiff for assign & add (#4709) @cu9hue
Full Changelog: https://github.com/tracel-ai/burn/compare/v0.21.0-pre.4...v0.21.0-pre.5