Repository: tracel-ai/burn Branch: main Commit: bcaabad860c5 Files: 1817 Total size: 9.5 MB Directory structure: gitextract_82tcaglc/ ├── .cargo/ │ ├── audit.toml │ └── config.toml ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ ├── doc_request.md │ │ └── feature_request.md │ ├── PULL_REQUEST_TEMPLATE/ │ │ └── template.md │ ├── dependabot.yml │ ├── pull_request_template.md │ └── workflows/ │ ├── combine-dependabot-prs.yml │ ├── dependencies.yml │ ├── publish.yml │ ├── stale-pr.yml │ ├── test-gpu.yml │ ├── test.yml │ ├── valgrind.yml │ └── vulnerabilities.yml ├── .gitignore ├── CITATION.cff ├── CODE-OF-CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── NOTICES.md ├── POEM.md ├── README.md ├── _typos.toml ├── benchmarks.toml ├── burn-book/ │ ├── .gitignore │ ├── .prettierrc.json │ ├── book.toml │ └── src/ │ ├── SUMMARY.md │ ├── advanced/ │ │ ├── README.md │ │ ├── backend-extension/ │ │ │ ├── README.md │ │ │ ├── custom-cubecl-kernel.md │ │ │ └── custom-wgpu-kernel.md │ │ ├── no-std.md │ │ └── web-assembly.md │ ├── basic-workflow/ │ │ ├── README.md │ │ ├── backend.md │ │ ├── data.md │ │ ├── inference.md │ │ ├── model.md │ │ └── training.md │ ├── building-blocks/ │ │ ├── README.md │ │ ├── autodiff.md │ │ ├── backend.md │ │ ├── config.md │ │ ├── dataset.md │ │ ├── learner.md │ │ ├── metric.md │ │ ├── module.md │ │ ├── record.md │ │ └── tensor.md │ ├── custom-training-loop.md │ ├── distributed-computing.md │ ├── examples.md │ ├── getting-started.md │ ├── models-and-pretrained-weights.md │ ├── motivation.md │ ├── onnx-import.md │ ├── overview.md │ ├── performance/ │ │ ├── README.md │ │ ├── distributed-computing.md │ │ ├── good-practices/ │ │ │ ├── README.md │ │ │ ├── asynchronous-execution.md │ │ │ ├── kernel-fusion.md │ │ │ └── kernel-selection.md │ │ └── quantization.md │ └── saving-and-loading.md ├── codecov.yml ├── contributor-book/ │ ├── .gitignore │ ├── .prettierrc.json │ ├── book.toml │ └── src/ │ ├── SUMMARY.md │ ├── frequently-encountered-issues/ │ │ ├── README.md │ │ └── issues-while-adding-ops.md │ ├── getting-started/ │ │ ├── README.md │ │ ├── configuring-your-editor.md │ │ ├── setting-up-the-environment.md │ │ └── testing.md │ ├── guides/ │ │ ├── README.md │ │ ├── adding-a-new-operation-to-burn.md │ │ └── submitting-examples.md │ ├── how-to-read-this-book.md │ ├── overview.md │ └── project-architecture/ │ ├── README.md │ ├── backend.md │ ├── module.md │ ├── serialization.md │ └── tensor.md ├── crates/ │ ├── burn/ │ │ ├── Cargo.toml │ │ └── src/ │ │ ├── backend.rs │ │ ├── collective.rs │ │ └── lib.rs │ ├── burn-autodiff/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── backend.rs │ │ ├── checkpoint/ │ │ │ ├── base.rs │ │ │ ├── builder.rs │ │ │ ├── mod.rs │ │ │ ├── retro_forward.rs │ │ │ ├── state.rs │ │ │ └── strategy.rs │ │ ├── grads.rs │ │ ├── graph/ │ │ │ ├── base.rs │ │ │ ├── mod.rs │ │ │ ├── node.rs │ │ │ ├── requirement.rs │ │ │ └── traversal.rs │ │ ├── lib.rs │ │ ├── ops/ │ │ │ ├── activation.rs │ │ │ ├── backward.rs │ │ │ ├── base.rs │ │ │ ├── bool_tensor.rs │ │ │ ├── int_tensor.rs │ │ │ ├── maxmin.rs │ │ │ ├── mod.rs │ │ │ ├── module.rs │ │ │ ├── qtensor.rs │ │ │ ├── sort.rs │ │ │ ├── tensor.rs │ │ │ └── transaction.rs │ │ ├── runtime/ │ │ │ ├── client.rs │ │ │ ├── graph.rs │ │ │ ├── memory_management.rs │ │ │ ├── mod.rs │ │ │ └── server.rs │ │ ├── tensor.rs │ │ └── utils.rs │ ├── burn-backend/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── backend/ │ │ │ ├── base.rs │ │ │ ├── device.rs │ │ │ ├── mod.rs │ │ │ ├── ops/ │ │ │ │ ├── activation.rs │ │ │ │ ├── argwhere.rs │ │ │ │ ├── bool_tensor.rs │ │ │ │ ├── cat.rs │ │ │ │ ├── int_tensor.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── modules/ │ │ │ │ │ ├── attention.rs │ │ │ │ │ ├── base.rs │ │ │ │ │ ├── conv.rs │ │ │ │ │ ├── grid_sample.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── pool.rs │ │ │ │ │ └── unfold.rs │ │ │ │ ├── qtensor.rs │ │ │ │ ├── repeat_dim.rs │ │ │ │ ├── sort.rs │ │ │ │ ├── tensor.rs │ │ │ │ └── transaction.rs │ │ │ └── primitive.rs │ │ ├── data/ │ │ │ ├── compare.rs │ │ │ ├── mod.rs │ │ │ └── tensor.rs │ │ ├── distribution.rs │ │ ├── element/ │ │ │ ├── base.rs │ │ │ ├── cast.rs │ │ │ ├── mod.rs │ │ │ └── scalar.rs │ │ ├── lib.rs │ │ └── tensor/ │ │ ├── alias.rs │ │ ├── container.rs │ │ ├── kind.rs │ │ ├── mod.rs │ │ ├── ops/ │ │ │ ├── autodiff.rs │ │ │ ├── base.rs │ │ │ ├── bool.rs │ │ │ ├── float.rs │ │ │ ├── int.rs │ │ │ ├── mod.rs │ │ │ ├── numeric.rs │ │ │ └── ordered.rs │ │ └── quantization/ │ │ ├── calibration.rs │ │ ├── mod.rs │ │ ├── parameters.rs │ │ └── scheme.rs │ ├── burn-backend-tests/ │ │ ├── .cargo/ │ │ │ └── config.toml │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── cubecl.toml │ │ ├── src/ │ │ │ └── lib.rs │ │ └── tests/ │ │ ├── autodiff/ │ │ │ ├── abs.rs │ │ │ ├── adaptive_avgpool1d.rs │ │ │ ├── adaptive_avgpool2d.rs │ │ │ ├── add.rs │ │ │ ├── aggregation.rs │ │ │ ├── avgpool1d.rs │ │ │ ├── avgpool2d.rs │ │ │ ├── backward.rs │ │ │ ├── bridge.rs │ │ │ ├── broadcast.rs │ │ │ ├── cast.rs │ │ │ ├── cat.rs │ │ │ ├── ceil.rs │ │ │ ├── checkpoint.rs │ │ │ ├── complex.rs │ │ │ ├── conv1d.rs │ │ │ ├── conv2d.rs │ │ │ ├── conv3d.rs │ │ │ ├── conv_transpose1d.rs │ │ │ ├── conv_transpose2d.rs │ │ │ ├── conv_transpose3d.rs │ │ │ ├── cross.rs │ │ │ ├── cross_entropy.rs │ │ │ ├── cummax.rs │ │ │ ├── cummin.rs │ │ │ ├── cumprod.rs │ │ │ ├── cumsum.rs │ │ │ ├── deform_conv2d.rs │ │ │ ├── div.rs │ │ │ ├── erf.rs │ │ │ ├── exp.rs │ │ │ ├── expand.rs │ │ │ ├── flip.rs │ │ │ ├── floor.rs │ │ │ ├── gather_scatter.rs │ │ │ ├── gelu.rs │ │ │ ├── gradients.rs │ │ │ ├── log.rs │ │ │ ├── log1p.rs │ │ │ ├── log_sigmoid.rs │ │ │ ├── mask.rs │ │ │ ├── matmul.rs │ │ │ ├── maxmin.rs │ │ │ ├── maxpool1d.rs │ │ │ ├── maxpool2d.rs │ │ │ ├── memory_management.rs │ │ │ ├── mod.rs │ │ │ ├── mul.rs │ │ │ ├── multithread.rs │ │ │ ├── nearest_interpolate.rs │ │ │ ├── neg.rs │ │ │ ├── nonzero.rs │ │ │ ├── permute.rs │ │ │ ├── pow.rs │ │ │ ├── recip.rs │ │ │ ├── relu.rs │ │ │ ├── remainder.rs │ │ │ ├── repeat_dim.rs │ │ │ ├── reshape.rs │ │ │ ├── round.rs │ │ │ ├── select.rs │ │ │ ├── sigmoid.rs │ │ │ ├── sign.rs │ │ │ ├── slice.rs │ │ │ ├── slice_assign.rs │ │ │ ├── softmax.rs │ │ │ ├── sort.rs │ │ │ ├── sqrt.rs │ │ │ ├── sub.rs │ │ │ ├── transpose.rs │ │ │ ├── trig.rs │ │ │ └── unfold.rs │ │ ├── autodiff.rs │ │ ├── common/ │ │ │ ├── autodiff.rs │ │ │ ├── backend.rs │ │ │ └── tensor.rs │ │ ├── cubecl/ │ │ │ ├── avg_pool2d.rs │ │ │ ├── bernoulli.rs │ │ │ ├── cast.rs │ │ │ ├── cat.rs │ │ │ ├── clamp.rs │ │ │ ├── contiguous.rs │ │ │ ├── conv2d.rs │ │ │ ├── conv3d.rs │ │ │ ├── conv_transpose2d.rs │ │ │ ├── conv_transpose3d.rs │ │ │ ├── cross.rs │ │ │ ├── gather.rs │ │ │ ├── mask_fill.rs │ │ │ ├── mask_where.rs │ │ │ ├── max_pool2d.rs │ │ │ ├── max_pool2d_backward.rs │ │ │ ├── mod.rs │ │ │ ├── normal.rs │ │ │ ├── quantization.rs │ │ │ ├── reduce.rs │ │ │ ├── repeat_dim.rs │ │ │ ├── scatter.rs │ │ │ ├── select.rs │ │ │ ├── select_assign.rs │ │ │ ├── slice.rs │ │ │ ├── slice_assign.rs │ │ │ ├── unary.rs │ │ │ └── uniform.rs │ │ ├── cubecl.rs │ │ ├── fused_ops/ │ │ │ ├── mod.rs │ │ │ └── reduce_broadcasted.rs │ │ ├── fusion.rs │ │ ├── tensor/ │ │ │ ├── bool/ │ │ │ │ ├── mod.rs │ │ │ │ └── ops/ │ │ │ │ ├── all.rs │ │ │ │ ├── any.rs │ │ │ │ ├── argwhere_nonzero.rs │ │ │ │ ├── cat.rs │ │ │ │ ├── comparison.rs │ │ │ │ ├── create_like.rs │ │ │ │ ├── expand.rs │ │ │ │ ├── flip.rs │ │ │ │ ├── full.rs │ │ │ │ ├── gather_scatter.rs │ │ │ │ ├── init.rs │ │ │ │ ├── logical.rs │ │ │ │ ├── mask.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── movedim.rs │ │ │ │ ├── permute.rs │ │ │ │ ├── repeat.rs │ │ │ │ ├── repeat_dim.rs │ │ │ │ ├── reshape.rs │ │ │ │ ├── select.rs │ │ │ │ ├── stack.rs │ │ │ │ ├── take.rs │ │ │ │ ├── transpose.rs │ │ │ │ ├── tri_mask.rs │ │ │ │ └── unfold.rs │ │ │ ├── clone_invariance.rs │ │ │ ├── float/ │ │ │ │ ├── activation/ │ │ │ │ │ ├── celu.rs │ │ │ │ │ ├── elu.rs │ │ │ │ │ ├── gelu.rs │ │ │ │ │ ├── glu.rs │ │ │ │ │ ├── hard_sigmoid.rs │ │ │ │ │ ├── leaky_relu.rs │ │ │ │ │ ├── log_sigmoid.rs │ │ │ │ │ ├── mish.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── prelu.rs │ │ │ │ │ ├── quiet_softmax.rs │ │ │ │ │ ├── relu.rs │ │ │ │ │ ├── selu.rs │ │ │ │ │ ├── sigmoid.rs │ │ │ │ │ ├── silu.rs │ │ │ │ │ ├── softmax.rs │ │ │ │ │ ├── softmin.rs │ │ │ │ │ ├── softplus.rs │ │ │ │ │ ├── softsign.rs │ │ │ │ │ ├── tanh_activation.rs │ │ │ │ │ └── thresholded_relu.rs │ │ │ │ ├── grid/ │ │ │ │ │ ├── affine_grid.rs │ │ │ │ │ ├── meshgrid.rs │ │ │ │ │ └── mod.rs │ │ │ │ ├── linalg/ │ │ │ │ │ ├── cosine_similarity.rs │ │ │ │ │ ├── diag.rs │ │ │ │ │ ├── lu_decomposition.rs │ │ │ │ │ ├── matvec.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── outer.rs │ │ │ │ │ ├── trace.rs │ │ │ │ │ └── vector_norm.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── module/ │ │ │ │ │ ├── adaptive_avgpool1d.rs │ │ │ │ │ ├── adaptive_avgpool2d.rs │ │ │ │ │ ├── attention.rs │ │ │ │ │ ├── avgpool1d.rs │ │ │ │ │ ├── avgpool2d.rs │ │ │ │ │ ├── bicubic_interpolate.rs │ │ │ │ │ ├── bilinear_interpolate.rs │ │ │ │ │ ├── conv1d.rs │ │ │ │ │ ├── conv2d.rs │ │ │ │ │ ├── conv3d.rs │ │ │ │ │ ├── conv_transpose1d.rs │ │ │ │ │ ├── conv_transpose2d.rs │ │ │ │ │ ├── conv_transpose3d.rs │ │ │ │ │ ├── deform_conv2d.rs │ │ │ │ │ ├── forward.rs │ │ │ │ │ ├── lanczos3_interpolate.rs │ │ │ │ │ ├── linear.rs │ │ │ │ │ ├── maxpool1d.rs │ │ │ │ │ ├── maxpool2d.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── nearest_interpolate.rs │ │ │ │ │ └── unfold4d.rs │ │ │ │ ├── ops/ │ │ │ │ │ ├── abs.rs │ │ │ │ │ ├── add.rs │ │ │ │ │ ├── aggregation.rs │ │ │ │ │ ├── all.rs │ │ │ │ │ ├── any.rs │ │ │ │ │ ├── arg.rs │ │ │ │ │ ├── cast.rs │ │ │ │ │ ├── cat.rs │ │ │ │ │ ├── ceil.rs │ │ │ │ │ ├── chunk.rs │ │ │ │ │ ├── clamp.rs │ │ │ │ │ ├── close.rs │ │ │ │ │ ├── comparison.rs │ │ │ │ │ ├── create_like.rs │ │ │ │ │ ├── cross.rs │ │ │ │ │ ├── cumulative.rs │ │ │ │ │ ├── div.rs │ │ │ │ │ ├── dot.rs │ │ │ │ │ ├── erf.rs │ │ │ │ │ ├── exp.rs │ │ │ │ │ ├── expand.rs │ │ │ │ │ ├── finite.rs │ │ │ │ │ ├── flatten.rs │ │ │ │ │ ├── flip.rs │ │ │ │ │ ├── floor.rs │ │ │ │ │ ├── fmod.rs │ │ │ │ │ ├── full.rs │ │ │ │ │ ├── gather_scatter.rs │ │ │ │ │ ├── grid_sample.rs │ │ │ │ │ ├── inf.rs │ │ │ │ │ ├── init.rs │ │ │ │ │ ├── iter_dim.rs │ │ │ │ │ ├── log.rs │ │ │ │ │ ├── log1p.rs │ │ │ │ │ ├── mask.rs │ │ │ │ │ ├── matmul.rs │ │ │ │ │ ├── maxmin.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── movedim.rs │ │ │ │ │ ├── mul.rs │ │ │ │ │ ├── nan.rs │ │ │ │ │ ├── narrow.rs │ │ │ │ │ ├── neg.rs │ │ │ │ │ ├── one_hot.rs │ │ │ │ │ ├── padding.rs │ │ │ │ │ ├── permute.rs │ │ │ │ │ ├── powf.rs │ │ │ │ │ ├── powf_scalar.rs │ │ │ │ │ ├── prod.rs │ │ │ │ │ ├── random.rs │ │ │ │ │ ├── recip.rs │ │ │ │ │ ├── remainder.rs │ │ │ │ │ ├── repeat.rs │ │ │ │ │ ├── repeat_dim.rs │ │ │ │ │ ├── reshape.rs │ │ │ │ │ ├── round.rs │ │ │ │ │ ├── select.rs │ │ │ │ │ ├── sign.rs │ │ │ │ │ ├── slice.rs │ │ │ │ │ ├── slice_assign.rs │ │ │ │ │ ├── sort_argsort.rs │ │ │ │ │ ├── split.rs │ │ │ │ │ ├── sqrt.rs │ │ │ │ │ ├── square.rs │ │ │ │ │ ├── squeeze.rs │ │ │ │ │ ├── stack.rs │ │ │ │ │ ├── sub.rs │ │ │ │ │ ├── take.rs │ │ │ │ │ ├── topk.rs │ │ │ │ │ ├── transaction.rs │ │ │ │ │ ├── transpose.rs │ │ │ │ │ ├── tri.rs │ │ │ │ │ ├── trig.rs │ │ │ │ │ ├── trunc.rs │ │ │ │ │ └── unfold.rs │ │ │ │ ├── primitive.rs │ │ │ │ ├── quantization/ │ │ │ │ │ ├── calibration.rs │ │ │ │ │ ├── data.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── ops/ │ │ │ │ │ │ ├── extended/ │ │ │ │ │ │ │ ├── abs.rs │ │ │ │ │ │ │ ├── add.rs │ │ │ │ │ │ │ ├── aggregation.rs │ │ │ │ │ │ │ ├── all.rs │ │ │ │ │ │ │ ├── any.rs │ │ │ │ │ │ │ ├── arg.rs │ │ │ │ │ │ │ ├── cat.rs │ │ │ │ │ │ │ ├── ceil.rs │ │ │ │ │ │ │ ├── chunk.rs │ │ │ │ │ │ │ ├── clamp.rs │ │ │ │ │ │ │ ├── cos.rs │ │ │ │ │ │ │ ├── cosh.rs │ │ │ │ │ │ │ ├── div.rs │ │ │ │ │ │ │ ├── erf.rs │ │ │ │ │ │ │ ├── exp.rs │ │ │ │ │ │ │ ├── expand.rs │ │ │ │ │ │ │ ├── flip.rs │ │ │ │ │ │ │ ├── floor.rs │ │ │ │ │ │ │ ├── gather_scatter.rs │ │ │ │ │ │ │ ├── log.rs │ │ │ │ │ │ │ ├── log1p.rs │ │ │ │ │ │ │ ├── map_comparison.rs │ │ │ │ │ │ │ ├── mask.rs │ │ │ │ │ │ │ ├── maxmin.rs │ │ │ │ │ │ │ ├── mod.rs │ │ │ │ │ │ │ ├── mul.rs │ │ │ │ │ │ │ ├── narrow.rs │ │ │ │ │ │ │ ├── neg.rs │ │ │ │ │ │ │ ├── permute.rs │ │ │ │ │ │ │ ├── powf.rs │ │ │ │ │ │ │ ├── powf_scalar.rs │ │ │ │ │ │ │ ├── recip.rs │ │ │ │ │ │ │ ├── remainder.rs │ │ │ │ │ │ │ ├── repeat_dim.rs │ │ │ │ │ │ │ ├── reshape.rs │ │ │ │ │ │ │ ├── round.rs │ │ │ │ │ │ │ ├── select.rs │ │ │ │ │ │ │ ├── sin.rs │ │ │ │ │ │ │ ├── sinh.rs │ │ │ │ │ │ │ ├── slice.rs │ │ │ │ │ │ │ ├── sort_argsort.rs │ │ │ │ │ │ │ ├── split.rs │ │ │ │ │ │ │ ├── sqrt.rs │ │ │ │ │ │ │ ├── stack.rs │ │ │ │ │ │ │ ├── sub.rs │ │ │ │ │ │ │ ├── tan.rs │ │ │ │ │ │ │ ├── tanh.rs │ │ │ │ │ │ │ ├── topk.rs │ │ │ │ │ │ │ └── transpose.rs │ │ │ │ │ │ ├── matmul.rs │ │ │ │ │ │ ├── mod.rs │ │ │ │ │ │ └── quantize.rs │ │ │ │ │ └── scheme.rs │ │ │ │ └── stats/ │ │ │ │ ├── cov.rs │ │ │ │ ├── display.rs │ │ │ │ ├── eye.rs │ │ │ │ ├── median.rs │ │ │ │ ├── mod.rs │ │ │ │ └── var.rs │ │ │ ├── int/ │ │ │ │ ├── mod.rs │ │ │ │ ├── ops/ │ │ │ │ │ ├── abs.rs │ │ │ │ │ ├── add.rs │ │ │ │ │ ├── aggregation.rs │ │ │ │ │ ├── all.rs │ │ │ │ │ ├── any.rs │ │ │ │ │ ├── arange.rs │ │ │ │ │ ├── arange_step.rs │ │ │ │ │ ├── arg.rs │ │ │ │ │ ├── bitwise.rs │ │ │ │ │ ├── cartesian_grid.rs │ │ │ │ │ ├── cast.rs │ │ │ │ │ ├── cat.rs │ │ │ │ │ ├── chunk.rs │ │ │ │ │ ├── comparison.rs │ │ │ │ │ ├── create_like.rs │ │ │ │ │ ├── cumulative.rs │ │ │ │ │ ├── div.rs │ │ │ │ │ ├── expand.rs │ │ │ │ │ ├── flip.rs │ │ │ │ │ ├── full.rs │ │ │ │ │ ├── gather_scatter.rs │ │ │ │ │ ├── init.rs │ │ │ │ │ ├── mask.rs │ │ │ │ │ ├── matmul.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── movedim.rs │ │ │ │ │ ├── mul.rs │ │ │ │ │ ├── one_hot.rs │ │ │ │ │ ├── permute.rs │ │ │ │ │ ├── random.rs │ │ │ │ │ ├── remainder.rs │ │ │ │ │ ├── repeat.rs │ │ │ │ │ ├── repeat_dim.rs │ │ │ │ │ ├── reshape.rs │ │ │ │ │ ├── roll.rs │ │ │ │ │ ├── select.rs │ │ │ │ │ ├── sign.rs │ │ │ │ │ ├── slice.rs │ │ │ │ │ ├── slice_assign.rs │ │ │ │ │ ├── sort_argsort.rs │ │ │ │ │ ├── stack.rs │ │ │ │ │ ├── sub.rs │ │ │ │ │ ├── take.rs │ │ │ │ │ ├── topk.rs │ │ │ │ │ ├── transpose.rs │ │ │ │ │ ├── tri.rs │ │ │ │ │ └── unfold.rs │ │ │ │ └── primitive.rs │ │ │ ├── mod.rs │ │ │ └── multi_threads.rs │ │ └── tensor.rs │ ├── burn-candle/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── backend.rs │ │ ├── element.rs │ │ ├── lib.rs │ │ ├── ops/ │ │ │ ├── activation.rs │ │ │ ├── base.rs │ │ │ ├── bool_tensor.rs │ │ │ ├── candle_utils.rs │ │ │ ├── int_tensor.rs │ │ │ ├── mod.rs │ │ │ ├── module.rs │ │ │ ├── qtensor.rs │ │ │ ├── tensor.rs │ │ │ ├── transaction.rs │ │ │ └── utils.rs │ │ └── tensor.rs │ ├── burn-collective/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── multinode-tests/ │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ └── src/ │ │ │ ├── bin/ │ │ │ │ ├── global.rs │ │ │ │ ├── node.rs │ │ │ │ └── test_launcher.rs │ │ │ ├── lib.rs │ │ │ └── shared.rs │ │ └── src/ │ │ ├── api.rs │ │ ├── config.rs │ │ ├── global/ │ │ │ ├── base.rs │ │ │ ├── mod.rs │ │ │ ├── node/ │ │ │ │ ├── base.rs │ │ │ │ ├── centralized.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── ring.rs │ │ │ │ ├── sync.rs │ │ │ │ ├── tree.rs │ │ │ │ └── worker.rs │ │ │ ├── orchestrator/ │ │ │ │ ├── base.rs │ │ │ │ ├── mod.rs │ │ │ │ └── state.rs │ │ │ └── shared.rs │ │ ├── lib.rs │ │ ├── local/ │ │ │ ├── all_reduce/ │ │ │ │ ├── base.rs │ │ │ │ ├── centralized.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── op.rs │ │ │ │ ├── ring.rs │ │ │ │ └── tree.rs │ │ │ ├── broadcast/ │ │ │ │ ├── centralized.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── op.rs │ │ │ │ └── tree.rs │ │ │ ├── client.rs │ │ │ ├── mod.rs │ │ │ ├── reduce/ │ │ │ │ ├── centralized.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── op.rs │ │ │ │ └── tree.rs │ │ │ ├── server.rs │ │ │ └── tensor_map.rs │ │ └── tests/ │ │ ├── all_reduce.rs │ │ ├── broadcast.rs │ │ ├── mod.rs │ │ └── reduce.rs │ ├── burn-communication/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── base.rs │ │ ├── data_service.rs │ │ ├── lib.rs │ │ ├── util.rs │ │ └── websocket/ │ │ ├── base.rs │ │ ├── client.rs │ │ ├── mod.rs │ │ └── server.rs │ ├── burn-core/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── src/ │ │ │ ├── config.rs │ │ │ ├── data/ │ │ │ │ ├── dataloader/ │ │ │ │ │ ├── base.rs │ │ │ │ │ ├── batch.rs │ │ │ │ │ ├── batcher.rs │ │ │ │ │ ├── builder.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── multithread.rs │ │ │ │ │ ├── split.rs │ │ │ │ │ └── strategy.rs │ │ │ │ └── mod.rs │ │ │ ├── lib.rs │ │ │ ├── module/ │ │ │ │ ├── base.rs │ │ │ │ ├── display.rs │ │ │ │ ├── initializer.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── param/ │ │ │ │ │ ├── base.rs │ │ │ │ │ ├── constant.rs │ │ │ │ │ ├── id.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── primitive.rs │ │ │ │ │ ├── running.rs │ │ │ │ │ ├── tensor.rs │ │ │ │ │ └── visitor.rs │ │ │ │ ├── quantize.rs │ │ │ │ └── reinit.rs │ │ │ ├── record/ │ │ │ │ ├── base.rs │ │ │ │ ├── file.rs │ │ │ │ ├── memory.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── primitive.rs │ │ │ │ ├── recorder.rs │ │ │ │ ├── serde/ │ │ │ │ │ ├── adapter.rs │ │ │ │ │ ├── data.rs │ │ │ │ │ ├── de.rs │ │ │ │ │ ├── error.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── ser.rs │ │ │ │ ├── settings.rs │ │ │ │ └── tensor.rs │ │ │ ├── tensor.rs │ │ │ └── vision.rs │ │ └── tests/ │ │ ├── test_derive_config.rs │ │ ├── test_derive_module.rs │ │ ├── test_derive_record.rs │ │ └── test_record_resilience.rs │ ├── burn-cpu/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ └── lib.rs │ ├── burn-cubecl/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── backend.rs │ │ ├── element.rs │ │ ├── fusion.rs │ │ ├── kernel/ │ │ │ ├── attention/ │ │ │ │ ├── base.rs │ │ │ │ ├── mod.rs │ │ │ │ └── tune.rs │ │ │ ├── binary.rs │ │ │ ├── binary_float.rs │ │ │ ├── binary_int.rs │ │ │ ├── cast/ │ │ │ │ ├── base.rs │ │ │ │ ├── bool_cast.rs │ │ │ │ └── mod.rs │ │ │ ├── clamp.rs │ │ │ ├── comparison.rs │ │ │ ├── contiguous.rs │ │ │ ├── conv/ │ │ │ │ ├── backward_data/ │ │ │ │ │ ├── fallback.rs │ │ │ │ │ ├── implicit_gemm/ │ │ │ │ │ │ ├── launch.rs │ │ │ │ │ │ └── mod.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── tune.rs │ │ │ │ ├── backward_weight/ │ │ │ │ │ ├── fallback.rs │ │ │ │ │ ├── implicit_gemm/ │ │ │ │ │ │ ├── launch.rs │ │ │ │ │ │ └── mod.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── tune.rs │ │ │ │ ├── base.rs │ │ │ │ ├── conv_transpose2d/ │ │ │ │ │ ├── base.rs │ │ │ │ │ ├── col2im.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── transpose_direct.rs │ │ │ │ │ └── tune.rs │ │ │ │ ├── conv_transpose3d.rs │ │ │ │ ├── deform_conv2d.rs │ │ │ │ ├── deform_conv_transpose2d.rs │ │ │ │ ├── direct.rs │ │ │ │ ├── forward/ │ │ │ │ │ ├── implicit_gemm/ │ │ │ │ │ │ ├── launch.rs │ │ │ │ │ │ └── mod.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── tune.rs │ │ │ │ ├── im2col.rs │ │ │ │ ├── mod.rs │ │ │ │ └── tune_key.rs │ │ │ ├── cross.rs │ │ │ ├── grid_sample/ │ │ │ │ ├── base.rs │ │ │ │ ├── bilinear.rs │ │ │ │ └── mod.rs │ │ │ ├── index/ │ │ │ │ ├── flip.rs │ │ │ │ ├── gather.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── repeat_dim.rs │ │ │ │ ├── scatter.rs │ │ │ │ ├── select.rs │ │ │ │ ├── select_assign.rs │ │ │ │ ├── slice.rs │ │ │ │ └── slice_assign.rs │ │ │ ├── interpolate/ │ │ │ │ ├── base.rs │ │ │ │ ├── bicubic.rs │ │ │ │ ├── bilinear.rs │ │ │ │ ├── lanczos3.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── nearest.rs │ │ │ │ └── nearest_backward.rs │ │ │ ├── mask/ │ │ │ │ ├── base.rs │ │ │ │ ├── mask_fill.rs │ │ │ │ ├── mask_where.rs │ │ │ │ └── mod.rs │ │ │ ├── matmul/ │ │ │ │ ├── base.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── tune/ │ │ │ │ │ ├── base.rs │ │ │ │ │ └── mod.rs │ │ │ │ └── utils.rs │ │ │ ├── mod.rs │ │ │ ├── pool/ │ │ │ │ ├── adaptive_avg_pool2d.rs │ │ │ │ ├── adaptive_avg_pool2d_backward.rs │ │ │ │ ├── avg_pool2d.rs │ │ │ │ ├── avg_pool2d_backward.rs │ │ │ │ ├── max_pool2d.rs │ │ │ │ ├── max_pool2d_backward.rs │ │ │ │ ├── mod.rs │ │ │ │ └── pool2d.rs │ │ │ ├── prng/ │ │ │ │ ├── bernoulli.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── normal.rs │ │ │ │ └── uniform.rs │ │ │ ├── quantization/ │ │ │ │ ├── dequantize.rs │ │ │ │ ├── mod.rs │ │ │ │ └── quantize.rs │ │ │ ├── reduce/ │ │ │ │ ├── base.rs │ │ │ │ ├── mod.rs │ │ │ │ └── tune.rs │ │ │ ├── unary_float.rs │ │ │ ├── unary_int.rs │ │ │ ├── unary_numeric.rs │ │ │ └── utils.rs │ │ ├── lib.rs │ │ ├── ops/ │ │ │ ├── activation.rs │ │ │ ├── base.rs │ │ │ ├── bool_tensor.rs │ │ │ ├── int_tensor.rs │ │ │ ├── mod.rs │ │ │ ├── module.rs │ │ │ ├── numeric.rs │ │ │ ├── qtensor.rs │ │ │ ├── tensor.rs │ │ │ └── transaction.rs │ │ ├── template/ │ │ │ ├── base.rs │ │ │ ├── mod.rs │ │ │ └── source.rs │ │ ├── tensor/ │ │ │ ├── base.rs │ │ │ ├── mod.rs │ │ │ └── quantization.rs │ │ └── tune_key.rs │ ├── burn-cubecl-fusion/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── base.rs │ │ ├── engine/ │ │ │ ├── codegen/ │ │ │ │ ├── base.rs │ │ │ │ ├── io.rs │ │ │ │ ├── ir.rs │ │ │ │ ├── kernel.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── tensor.rs │ │ │ │ └── view.rs │ │ │ ├── fuser.rs │ │ │ ├── launch/ │ │ │ │ ├── base.rs │ │ │ │ ├── executor.rs │ │ │ │ ├── input.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── output.rs │ │ │ │ ├── plan.rs │ │ │ │ ├── runner.rs │ │ │ │ └── vectorization/ │ │ │ │ ├── base.rs │ │ │ │ ├── mod.rs │ │ │ │ └── planner.rs │ │ │ ├── mod.rs │ │ │ ├── scoring.rs │ │ │ ├── settings.rs │ │ │ └── trace/ │ │ │ ├── base.rs │ │ │ ├── block.rs │ │ │ ├── fuser.rs │ │ │ └── mod.rs │ │ ├── lib.rs │ │ ├── optim/ │ │ │ ├── base.rs │ │ │ ├── elemwise/ │ │ │ │ ├── fuser.rs │ │ │ │ ├── mod.rs │ │ │ │ └── optimization.rs │ │ │ ├── matmul/ │ │ │ │ ├── args.rs │ │ │ │ ├── fuser.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── optimization.rs │ │ │ │ └── tune.rs │ │ │ ├── mod.rs │ │ │ ├── reduce/ │ │ │ │ ├── args.rs │ │ │ │ ├── fuser.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── optimization.rs │ │ │ │ └── tune.rs │ │ │ └── reduce_broadcasted/ │ │ │ ├── fuser/ │ │ │ │ ├── base.rs │ │ │ │ ├── block.rs │ │ │ │ ├── full.rs │ │ │ │ ├── full_analyzer.rs │ │ │ │ └── mod.rs │ │ │ ├── launch.rs │ │ │ ├── mod.rs │ │ │ ├── optimization.rs │ │ │ ├── tune.rs │ │ │ └── unit.rs │ │ └── tune.rs │ ├── burn-cuda/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ └── lib.rs │ ├── burn-dataset/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── examples/ │ │ │ ├── hf_dataset.rs │ │ │ └── speech_commands.rs │ │ ├── src/ │ │ │ ├── audio/ │ │ │ │ ├── mod.rs │ │ │ │ └── speech_commands.rs │ │ │ ├── dataset/ │ │ │ │ ├── base.rs │ │ │ │ ├── dataframe.rs │ │ │ │ ├── fake.rs │ │ │ │ ├── in_memory.rs │ │ │ │ ├── iterator.rs │ │ │ │ ├── mod.rs │ │ │ │ └── sqlite.rs │ │ │ ├── lib.rs │ │ │ ├── nlp/ │ │ │ │ ├── ag_news.rs │ │ │ │ ├── mod.rs │ │ │ │ └── text_folder.rs │ │ │ ├── source/ │ │ │ │ ├── huggingface/ │ │ │ │ │ ├── downloader.rs │ │ │ │ │ ├── importer.py │ │ │ │ │ └── mod.rs │ │ │ │ └── mod.rs │ │ │ ├── transform/ │ │ │ │ ├── composed.rs │ │ │ │ ├── mapper.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── options.rs │ │ │ │ ├── partial.rs │ │ │ │ ├── sampler.rs │ │ │ │ ├── selection.rs │ │ │ │ ├── shuffle.rs │ │ │ │ └── window.rs │ │ │ └── vision/ │ │ │ ├── cifar.rs │ │ │ ├── image_folder.rs │ │ │ ├── mnist.rs │ │ │ └── mod.rs │ │ └── tests/ │ │ └── data/ │ │ ├── dataset-fmt.csv │ │ ├── dataset.csv │ │ ├── dataset.json │ │ ├── dataset_coco.json │ │ ├── segmask_folder/ │ │ │ └── annotations/ │ │ │ ├── mask_checkerboard.txt │ │ │ ├── mask_random_2colors.txt │ │ │ └── mask_random_3colors.txt │ │ └── text_folder/ │ │ ├── negative/ │ │ │ ├── sample1.txt │ │ │ └── sample2.txt │ │ └── positive/ │ │ ├── sample1.txt │ │ └── sample2.txt │ ├── burn-derive/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── config/ │ │ │ ├── analyzer.rs │ │ │ ├── analyzer_enum.rs │ │ │ ├── analyzer_struct.rs │ │ │ ├── base.rs │ │ │ └── mod.rs │ │ ├── lib.rs │ │ ├── module/ │ │ │ ├── base.rs │ │ │ ├── codegen.rs │ │ │ ├── codegen_enum.rs │ │ │ ├── codegen_struct.rs │ │ │ ├── display.rs │ │ │ ├── generics.rs │ │ │ ├── mod.rs │ │ │ ├── record.rs │ │ │ ├── record_enum.rs │ │ │ └── record_struct.rs │ │ ├── record/ │ │ │ ├── base.rs │ │ │ ├── codegen.rs │ │ │ ├── item/ │ │ │ │ ├── codegen.rs │ │ │ │ ├── codegen_enum.rs │ │ │ │ ├── codegen_struct.rs │ │ │ │ └── mod.rs │ │ │ └── mod.rs │ │ └── shared/ │ │ ├── attribute.rs │ │ ├── enum_variant.rs │ │ ├── field.rs │ │ ├── generics.rs │ │ └── mod.rs │ ├── burn-dispatch/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── build.rs │ │ └── src/ │ │ ├── backend.rs │ │ ├── device.rs │ │ ├── lib.rs │ │ ├── macros.rs │ │ ├── ops/ │ │ │ ├── activation.rs │ │ │ ├── bool_tensor.rs │ │ │ ├── int_tensor.rs │ │ │ ├── mod.rs │ │ │ ├── module.rs │ │ │ ├── qtensor.rs │ │ │ ├── tensor.rs │ │ │ └── transaction.rs │ │ └── tensor.rs │ ├── burn-fusion/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── backend.rs │ │ ├── client.rs │ │ ├── lib.rs │ │ ├── ops/ │ │ │ ├── activation.rs │ │ │ ├── base.rs │ │ │ ├── binary.rs │ │ │ ├── bool_tensor.rs │ │ │ ├── int_tensor.rs │ │ │ ├── mod.rs │ │ │ ├── module.rs │ │ │ ├── qtensor.rs │ │ │ ├── tensor.rs │ │ │ ├── transaction.rs │ │ │ └── unary.rs │ │ ├── search/ │ │ │ ├── block.rs │ │ │ ├── merging.rs │ │ │ ├── mod.rs │ │ │ └── optimization/ │ │ │ ├── blocks.rs │ │ │ ├── mod.rs │ │ │ └── stream.rs │ │ ├── server.rs │ │ ├── stream/ │ │ │ ├── base.rs │ │ │ ├── context.rs │ │ │ ├── execution/ │ │ │ │ ├── base.rs │ │ │ │ ├── explorer.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── ordering.rs │ │ │ │ ├── policy.rs │ │ │ │ ├── processor.rs │ │ │ │ ├── tests.rs │ │ │ │ └── validator.rs │ │ │ ├── memory_checks.rs │ │ │ ├── mod.rs │ │ │ ├── multi.rs │ │ │ ├── queue/ │ │ │ │ ├── base.rs │ │ │ │ ├── execution.rs │ │ │ │ └── mod.rs │ │ │ ├── shared_tensors.rs │ │ │ └── store/ │ │ │ ├── base.rs │ │ │ ├── index.rs │ │ │ └── mod.rs │ │ └── tensor.rs │ ├── burn-ir/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── backend.rs │ │ ├── builder.rs │ │ ├── handle.rs │ │ ├── lib.rs │ │ ├── operation.rs │ │ ├── scalar.rs │ │ └── tensor.rs │ ├── burn-ndarray/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── build.rs │ │ └── src/ │ │ ├── backend.rs │ │ ├── element.rs │ │ ├── lib.rs │ │ ├── ops/ │ │ │ ├── activation.rs │ │ │ ├── adaptive_avgpool.rs │ │ │ ├── avgpool.rs │ │ │ ├── base.rs │ │ │ ├── bool_tensor.rs │ │ │ ├── conv.rs │ │ │ ├── deform_conv.rs │ │ │ ├── grid_sample.rs │ │ │ ├── int_tensor.rs │ │ │ ├── interpolate.rs │ │ │ ├── macros.rs │ │ │ ├── matmul.rs │ │ │ ├── maxpool.rs │ │ │ ├── mod.rs │ │ │ ├── module.rs │ │ │ ├── padding.rs │ │ │ ├── qtensor.rs │ │ │ ├── quantization.rs │ │ │ ├── simd/ │ │ │ │ ├── avgpool.rs │ │ │ │ ├── base.rs │ │ │ │ ├── binary.rs │ │ │ │ ├── binary_elemwise.rs │ │ │ │ ├── cmp.rs │ │ │ │ ├── conv.rs │ │ │ │ ├── maxpool.rs │ │ │ │ ├── mod.rs │ │ │ │ └── unary.rs │ │ │ ├── tensor.rs │ │ │ └── transaction.rs │ │ ├── parallel.rs │ │ ├── rand.rs │ │ ├── sharing.rs │ │ ├── storage.rs │ │ └── tensor.rs │ ├── burn-nn/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── src/ │ │ │ ├── activation/ │ │ │ │ ├── activation_wrapper.rs │ │ │ │ ├── celu.rs │ │ │ │ ├── elu.rs │ │ │ │ ├── gelu.rs │ │ │ │ ├── glu.rs │ │ │ │ ├── hard_shrink.rs │ │ │ │ ├── hard_sigmoid.rs │ │ │ │ ├── hard_swish.rs │ │ │ │ ├── leaky_relu.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── prelu.rs │ │ │ │ ├── relu.rs │ │ │ │ ├── selu.rs │ │ │ │ ├── shrink.rs │ │ │ │ ├── sigmoid.rs │ │ │ │ ├── soft_shrink.rs │ │ │ │ ├── softplus.rs │ │ │ │ ├── softsign.rs │ │ │ │ ├── swiglu.rs │ │ │ │ ├── tanh.rs │ │ │ │ └── thresholded_relu.rs │ │ │ ├── lib.rs │ │ │ ├── loss/ │ │ │ │ ├── binary_cross_entropy.rs │ │ │ │ ├── cosine_embedding.rs │ │ │ │ ├── cross_entropy.rs │ │ │ │ ├── ctc.rs │ │ │ │ ├── huber.rs │ │ │ │ ├── kldiv.rs │ │ │ │ ├── lp_loss.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── mse.rs │ │ │ │ ├── poisson.rs │ │ │ │ ├── pretrained/ │ │ │ │ │ ├── gram_matrix/ │ │ │ │ │ │ ├── gram_matrix_loss.rs │ │ │ │ │ │ ├── mod.rs │ │ │ │ │ │ ├── vgg19.rs │ │ │ │ │ │ └── weights.rs │ │ │ │ │ └── mod.rs │ │ │ │ ├── reduction.rs │ │ │ │ ├── rnnt.rs │ │ │ │ └── smooth_l1.rs │ │ │ ├── modules/ │ │ │ │ ├── attention/ │ │ │ │ │ ├── cross_attention.rs │ │ │ │ │ ├── mask.rs │ │ │ │ │ ├── mha.rs │ │ │ │ │ └── mod.rs │ │ │ │ ├── cache/ │ │ │ │ │ ├── autoregressive.rs │ │ │ │ │ ├── base.rs │ │ │ │ │ └── mod.rs │ │ │ │ ├── conv/ │ │ │ │ │ ├── checks.rs │ │ │ │ │ ├── conv1d.rs │ │ │ │ │ ├── conv2d.rs │ │ │ │ │ ├── conv3d.rs │ │ │ │ │ ├── conv_transpose1d.rs │ │ │ │ │ ├── conv_transpose2d.rs │ │ │ │ │ ├── conv_transpose3d.rs │ │ │ │ │ ├── deform_conv2d.rs │ │ │ │ │ └── mod.rs │ │ │ │ ├── dropout.rs │ │ │ │ ├── embedding.rs │ │ │ │ ├── interpolate/ │ │ │ │ │ ├── interpolate1d.rs │ │ │ │ │ ├── interpolate2d.rs │ │ │ │ │ └── mod.rs │ │ │ │ ├── linear.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── noise.rs │ │ │ │ ├── norm/ │ │ │ │ │ ├── batch.rs │ │ │ │ │ ├── group.rs │ │ │ │ │ ├── instance.rs │ │ │ │ │ ├── layer.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── normalization_wrapper.rs │ │ │ │ │ └── rms.rs │ │ │ │ ├── pool/ │ │ │ │ │ ├── adaptive_avg_pool1d.rs │ │ │ │ │ ├── adaptive_avg_pool2d.rs │ │ │ │ │ ├── avg_pool1d.rs │ │ │ │ │ ├── avg_pool2d.rs │ │ │ │ │ ├── max_pool1d.rs │ │ │ │ │ ├── max_pool2d.rs │ │ │ │ │ └── mod.rs │ │ │ │ ├── pos_encoding.rs │ │ │ │ ├── rnn/ │ │ │ │ │ ├── basic.rs │ │ │ │ │ ├── gate_controller.rs │ │ │ │ │ ├── gru.rs │ │ │ │ │ ├── lstm.rs │ │ │ │ │ └── mod.rs │ │ │ │ ├── rope_encoding.rs │ │ │ │ ├── transformer/ │ │ │ │ │ ├── decoder.rs │ │ │ │ │ ├── encoder.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── pwff.rs │ │ │ │ └── unfold.rs │ │ │ └── padding.rs │ │ └── tests/ │ │ └── quantize.rs │ ├── burn-no-std-tests/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── src/ │ │ │ ├── burnpack.rs │ │ │ ├── conv.rs │ │ │ ├── lib.rs │ │ │ ├── mlp.rs │ │ │ ├── model.rs │ │ │ └── safetensors.rs │ │ └── tests/ │ │ ├── burnpack_tests.rs │ │ ├── safetensors_tests.rs │ │ └── test_integration.rs │ ├── burn-optim/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── grad_clipping/ │ │ │ ├── base.rs │ │ │ └── mod.rs │ │ ├── lib.rs │ │ ├── lr_scheduler/ │ │ │ ├── base.rs │ │ │ ├── composed.rs │ │ │ ├── constant.rs │ │ │ ├── cosine.rs │ │ │ ├── exponential.rs │ │ │ ├── linear.rs │ │ │ ├── mod.rs │ │ │ ├── noam.rs │ │ │ └── step.rs │ │ └── optim/ │ │ ├── adagrad.rs │ │ ├── adam.rs │ │ ├── adamw.rs │ │ ├── base.rs │ │ ├── decay.rs │ │ ├── grad_accum.rs │ │ ├── grads.rs │ │ ├── lbfgs.rs │ │ ├── mod.rs │ │ ├── momentum.rs │ │ ├── muon.rs │ │ ├── rmsprop.rs │ │ ├── sgd.rs │ │ ├── simple/ │ │ │ ├── adaptor.rs │ │ │ ├── base.rs │ │ │ ├── mod.rs │ │ │ └── record/ │ │ │ ├── base.rs │ │ │ ├── mod.rs │ │ │ └── v1.rs │ │ └── visitor.rs │ ├── burn-remote/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── client/ │ │ │ ├── base.rs │ │ │ ├── channel.rs │ │ │ ├── mod.rs │ │ │ ├── runner.rs │ │ │ └── worker.rs │ │ ├── lib.rs │ │ ├── server/ │ │ │ ├── base.rs │ │ │ ├── mod.rs │ │ │ ├── processor.rs │ │ │ ├── session.rs │ │ │ └── stream.rs │ │ └── shared/ │ │ ├── mod.rs │ │ └── task.rs │ ├── burn-rl/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── environment/ │ │ │ ├── base.rs │ │ │ └── mod.rs │ │ ├── lib.rs │ │ ├── policy/ │ │ │ ├── async_policy.rs │ │ │ ├── base.rs │ │ │ └── mod.rs │ │ └── transition_buffer/ │ │ ├── base.rs │ │ ├── mod.rs │ │ └── slice_access.rs │ ├── burn-rocm/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ └── lib.rs │ ├── burn-router/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── backend.rs │ │ ├── bridge/ │ │ │ ├── base.rs │ │ │ ├── byte.rs │ │ │ └── mod.rs │ │ ├── channel/ │ │ │ ├── base.rs │ │ │ ├── direct.rs │ │ │ └── mod.rs │ │ ├── client/ │ │ │ ├── base.rs │ │ │ └── mod.rs │ │ ├── lib.rs │ │ ├── ops/ │ │ │ ├── activation.rs │ │ │ ├── binary.rs │ │ │ ├── bool_tensor.rs │ │ │ ├── int_tensor.rs │ │ │ ├── mod.rs │ │ │ ├── module.rs │ │ │ ├── qtensor.rs │ │ │ ├── tensor.rs │ │ │ ├── transaction.rs │ │ │ └── unary.rs │ │ ├── runner.rs │ │ ├── tensor.rs │ │ └── types.rs │ ├── burn-std/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── id.rs │ │ ├── lib.rs │ │ ├── network.rs │ │ └── tensor/ │ │ ├── dtype.rs │ │ ├── mod.rs │ │ ├── quantization.rs │ │ ├── shape.rs │ │ └── slice.rs │ ├── burn-store/ │ │ ├── Cargo.toml │ │ ├── MIGRATION.md │ │ ├── README.md │ │ ├── benches/ │ │ │ ├── download_resnet18.py │ │ │ ├── generate_unified_models.py │ │ │ ├── resnet18_loading.rs │ │ │ ├── unified_loading.rs │ │ │ ├── unified_saving.rs │ │ │ └── zero_copy_loading.rs │ │ ├── examples/ │ │ │ ├── burnpack_inspect.rs │ │ │ └── half_precision.rs │ │ ├── pytorch-tests/ │ │ │ ├── Cargo.toml │ │ │ ├── src/ │ │ │ │ └── lib.rs │ │ │ └── tests/ │ │ │ ├── backend.rs │ │ │ ├── batch_norm/ │ │ │ │ ├── batch_norm2d.pt │ │ │ │ ├── export_weights.py │ │ │ │ └── mod.rs │ │ │ ├── boolean/ │ │ │ │ ├── boolean.pt │ │ │ │ ├── export_weights.py │ │ │ │ └── mod.rs │ │ │ ├── buffer/ │ │ │ │ ├── buffer.pt │ │ │ │ ├── export_weights.py │ │ │ │ └── mod.rs │ │ │ ├── complex_nested/ │ │ │ │ ├── complex_nested.pt │ │ │ │ ├── export_weights.py │ │ │ │ └── mod.rs │ │ │ ├── config/ │ │ │ │ ├── export_weights.py │ │ │ │ ├── mod.rs │ │ │ │ └── weights_with_config.pt │ │ │ ├── conv1d/ │ │ │ │ ├── conv1d.pt │ │ │ │ ├── export_weights.py │ │ │ │ └── mod.rs │ │ │ ├── conv2d/ │ │ │ │ ├── conv2d.pt │ │ │ │ ├── export_weights.py │ │ │ │ └── mod.rs │ │ │ ├── conv_transpose1d/ │ │ │ │ ├── conv_transpose1d.pt │ │ │ │ ├── export_weights.py │ │ │ │ └── mod.rs │ │ │ ├── conv_transpose2d/ │ │ │ │ ├── conv_transpose2d.pt │ │ │ │ ├── export_weights.py │ │ │ │ └── mod.rs │ │ │ ├── debug_test.pt │ │ │ ├── embedding/ │ │ │ │ ├── embedding.pt │ │ │ │ ├── export_weights.py │ │ │ │ └── mod.rs │ │ │ ├── enum_module/ │ │ │ │ ├── enum_depthwise_false.pt │ │ │ │ ├── enum_depthwise_true.pt │ │ │ │ ├── export_weights.py │ │ │ │ └── mod.rs │ │ │ ├── group_norm/ │ │ │ │ ├── export_weights.py │ │ │ │ ├── group_norm.pt │ │ │ │ └── mod.rs │ │ │ ├── integer/ │ │ │ │ ├── export_weights.py │ │ │ │ ├── integer.pt │ │ │ │ └── mod.rs │ │ │ ├── key_remap/ │ │ │ │ ├── export_weights.py │ │ │ │ ├── key_remap.pt │ │ │ │ └── mod.rs │ │ │ ├── key_remap_chained/ │ │ │ │ ├── export_weights.py │ │ │ │ ├── key_remap.pt │ │ │ │ └── mod.rs │ │ │ ├── layer_norm/ │ │ │ │ ├── export_weights.py │ │ │ │ ├── layer_norm.pt │ │ │ │ └── mod.rs │ │ │ ├── linear/ │ │ │ │ ├── export_weights.py │ │ │ │ ├── linear.pt │ │ │ │ ├── linear_with_bias.pt │ │ │ │ └── mod.rs │ │ │ ├── missing_module_field/ │ │ │ │ ├── export_weights.py │ │ │ │ ├── missing_module_field.pt │ │ │ │ └── mod.rs │ │ │ ├── non_contiguous_indexes/ │ │ │ │ ├── export_weights.py │ │ │ │ ├── mod.rs │ │ │ │ └── non_contiguous_indexes.pt │ │ │ ├── test_int.pt │ │ │ ├── test_mod.rs │ │ │ └── top_level_key/ │ │ │ ├── export_weights.py │ │ │ ├── mod.rs │ │ │ └── top_level_key.pt │ │ ├── safetensors-tests/ │ │ │ ├── Cargo.toml │ │ │ ├── src/ │ │ │ │ └── lib.rs │ │ │ └── tests/ │ │ │ ├── backend.rs │ │ │ ├── multi_layer/ │ │ │ │ ├── mod.rs │ │ │ │ ├── multi_layer.py │ │ │ │ └── multi_layer.safetensors │ │ │ └── test_mod.rs │ │ └── src/ │ │ ├── adapter.rs │ │ ├── applier.rs │ │ ├── apply_result.rs │ │ ├── burnpack/ │ │ │ ├── base.rs │ │ │ ├── mod.rs │ │ │ ├── reader.rs │ │ │ ├── store.rs │ │ │ ├── tests/ │ │ │ │ ├── alignment.rs │ │ │ │ ├── edge_cases.rs │ │ │ │ ├── header.rs │ │ │ │ ├── helpers.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── reader.rs │ │ │ │ ├── round_trip.rs │ │ │ │ ├── store.rs │ │ │ │ ├── writer.rs │ │ │ │ └── zero_copy.rs │ │ │ └── writer.rs │ │ ├── collector.rs │ │ ├── filter.rs │ │ ├── keyremapper.rs │ │ ├── lib.rs │ │ ├── pytorch/ │ │ │ ├── lazy_data.rs │ │ │ ├── mod.rs │ │ │ ├── pickle_reader.rs │ │ │ ├── reader.rs │ │ │ ├── store.rs │ │ │ └── tests/ │ │ │ ├── mod.rs │ │ │ ├── reader/ │ │ │ │ ├── create_legacy_with_offsets.py │ │ │ │ ├── create_tar_format.py │ │ │ │ ├── mod.rs │ │ │ │ ├── simple_legacy.py │ │ │ │ ├── test_data/ │ │ │ │ │ ├── bfloat16.pt │ │ │ │ │ ├── bool.pt │ │ │ │ │ ├── broken.pt │ │ │ │ │ ├── buffers.pt │ │ │ │ │ ├── checkpoint.pt │ │ │ │ │ ├── complex_structure.pt │ │ │ │ │ ├── empty.pt │ │ │ │ │ ├── extreme_values.pt │ │ │ │ │ ├── float16.pt │ │ │ │ │ ├── float32.pt │ │ │ │ │ ├── float64.pt │ │ │ │ │ ├── int16.pt │ │ │ │ │ ├── int32.pt │ │ │ │ │ ├── int64.pt │ │ │ │ │ ├── int8.pt │ │ │ │ │ ├── large_shape.pt │ │ │ │ │ ├── legacy_shared_storage.pt │ │ │ │ │ ├── legacy_with_offsets.pt │ │ │ │ │ ├── mixed_types.pt │ │ │ │ │ ├── nested_dict.pt │ │ │ │ │ ├── parameter.pt │ │ │ │ │ ├── scalar.pt │ │ │ │ │ ├── simple_legacy.pt │ │ │ │ │ ├── special_values.pt │ │ │ │ │ ├── state_dict.pt │ │ │ │ │ ├── tensor_2d.pt │ │ │ │ │ ├── tensor_3d.pt │ │ │ │ │ ├── tensor_4d.pt │ │ │ │ │ └── uint8.pt │ │ │ │ └── test_data.py │ │ │ └── store/ │ │ │ ├── mod.rs │ │ │ └── test_data/ │ │ │ ├── generate_enum_test.py │ │ │ └── model_without_enum_variants.pt │ │ ├── safetensors/ │ │ │ ├── mod.rs │ │ │ ├── store.rs │ │ │ └── tests/ │ │ │ ├── adapter.rs │ │ │ ├── direct_access.rs │ │ │ ├── error_handling.rs │ │ │ ├── file_io.rs │ │ │ ├── filtering.rs │ │ │ ├── integration.rs │ │ │ ├── metadata.rs │ │ │ ├── mixed_datatypes.rs │ │ │ ├── mod.rs │ │ │ ├── multi_layer_verify.rs │ │ │ ├── pytorch_import.rs │ │ │ └── round_trip.rs │ │ ├── tensor_snapshot.rs │ │ └── traits.rs │ ├── burn-tch/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── build.rs │ │ └── src/ │ │ ├── backend.rs │ │ ├── bin/ │ │ │ ├── cpu.rs │ │ │ ├── cuda.rs │ │ │ └── mps.rs │ │ ├── cuda_hack/ │ │ │ ├── dummy_cuda_dependency.cpp │ │ │ └── fake_cuda_dependency.cpp │ │ ├── element.rs │ │ ├── lib.rs │ │ ├── ops/ │ │ │ ├── activation.rs │ │ │ ├── base.rs │ │ │ ├── bool_tensor.rs │ │ │ ├── int_tensor.rs │ │ │ ├── mod.rs │ │ │ ├── module.rs │ │ │ ├── qtensor.rs │ │ │ ├── tensor.rs │ │ │ └── transaction.rs │ │ └── tensor.rs │ ├── burn-tensor/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── device.rs │ │ ├── lib.rs │ │ └── tensor/ │ │ ├── activation/ │ │ │ ├── base.rs │ │ │ └── mod.rs │ │ ├── api/ │ │ │ ├── autodiff.rs │ │ │ ├── base.rs │ │ │ ├── bool.rs │ │ │ ├── cartesian_grid.rs │ │ │ ├── check.rs │ │ │ ├── float.rs │ │ │ ├── fmod.rs │ │ │ ├── int.rs │ │ │ ├── mod.rs │ │ │ ├── numeric.rs │ │ │ ├── options.rs │ │ │ ├── orderable.rs │ │ │ ├── pad.rs │ │ │ ├── take.rs │ │ │ ├── transaction.rs │ │ │ └── trunc.rs │ │ ├── grid/ │ │ │ ├── affine_grid.rs │ │ │ ├── meshgrid.rs │ │ │ └── mod.rs │ │ ├── linalg/ │ │ │ ├── cosine_similarity.rs │ │ │ ├── diag.rs │ │ │ ├── lu_decomposition.rs │ │ │ ├── matvec.rs │ │ │ ├── mod.rs │ │ │ ├── outer.rs │ │ │ ├── trace.rs │ │ │ └── vector_norm.rs │ │ ├── loss/ │ │ │ └── mod.rs │ │ ├── mod.rs │ │ ├── module.rs │ │ ├── quantization.rs │ │ ├── report.rs │ │ └── stats/ │ │ └── mod.rs │ ├── burn-tensor-testgen/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ └── lib.rs │ ├── burn-train/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── checkpoint/ │ │ │ ├── async_checkpoint.rs │ │ │ ├── base.rs │ │ │ ├── file.rs │ │ │ ├── mod.rs │ │ │ └── strategy/ │ │ │ ├── base.rs │ │ │ ├── composed.rs │ │ │ ├── lastn.rs │ │ │ ├── metric.rs │ │ │ └── mod.rs │ │ ├── components.rs │ │ ├── evaluator/ │ │ │ ├── base.rs │ │ │ ├── builder.rs │ │ │ ├── components.rs │ │ │ └── mod.rs │ │ ├── learner/ │ │ │ ├── application_logger.rs │ │ │ ├── base.rs │ │ │ ├── classification.rs │ │ │ ├── early_stopping.rs │ │ │ ├── mod.rs │ │ │ ├── regression.rs │ │ │ ├── rl/ │ │ │ │ ├── checkpointer.rs │ │ │ │ ├── components.rs │ │ │ │ ├── env_runner/ │ │ │ │ │ ├── async_runner.rs │ │ │ │ │ ├── base.rs │ │ │ │ │ └── mod.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── off_policy.rs │ │ │ │ ├── output.rs │ │ │ │ ├── paradigm.rs │ │ │ │ └── strategy.rs │ │ │ ├── sequence.rs │ │ │ ├── summary.rs │ │ │ ├── supervised/ │ │ │ │ ├── mod.rs │ │ │ │ ├── paradigm.rs │ │ │ │ ├── step/ │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── train.rs │ │ │ │ └── strategies/ │ │ │ │ ├── base.rs │ │ │ │ ├── ddp/ │ │ │ │ │ ├── README.md │ │ │ │ │ ├── epoch.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── strategy.rs │ │ │ │ │ └── worker.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── multi/ │ │ │ │ │ ├── epoch.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── strategy.rs │ │ │ │ └── single/ │ │ │ │ ├── epoch.rs │ │ │ │ ├── mod.rs │ │ │ │ └── strategy.rs │ │ │ └── train_val.rs │ │ ├── lib.rs │ │ ├── logger/ │ │ │ ├── async_logger.rs │ │ │ ├── base.rs │ │ │ ├── file.rs │ │ │ ├── in_memory.rs │ │ │ ├── metric.rs │ │ │ └── mod.rs │ │ ├── metric/ │ │ │ ├── acc.rs │ │ │ ├── auroc.rs │ │ │ ├── base.rs │ │ │ ├── cer.rs │ │ │ ├── classification.rs │ │ │ ├── confusion_stats.rs │ │ │ ├── cpu_temp.rs │ │ │ ├── cpu_use.rs │ │ │ ├── cuda.rs │ │ │ ├── fbetascore.rs │ │ │ ├── hamming.rs │ │ │ ├── iteration.rs │ │ │ ├── learning_rate.rs │ │ │ ├── loss.rs │ │ │ ├── memory_use.rs │ │ │ ├── mod.rs │ │ │ ├── perplexity.rs │ │ │ ├── precision.rs │ │ │ ├── processor/ │ │ │ │ ├── async_wrapper.rs │ │ │ │ ├── base.rs │ │ │ │ ├── full.rs │ │ │ │ ├── metrics.rs │ │ │ │ ├── minimal.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── rl_metrics.rs │ │ │ │ └── rl_processor.rs │ │ │ ├── recall.rs │ │ │ ├── rl/ │ │ │ │ ├── cum_reward.rs │ │ │ │ ├── ep_len.rs │ │ │ │ ├── exploration_rate.rs │ │ │ │ └── mod.rs │ │ │ ├── state.rs │ │ │ ├── store/ │ │ │ │ ├── aggregate.rs │ │ │ │ ├── base.rs │ │ │ │ ├── client.rs │ │ │ │ ├── log.rs │ │ │ │ └── mod.rs │ │ │ ├── top_k_acc.rs │ │ │ ├── vision/ │ │ │ │ ├── dice.rs │ │ │ │ ├── dists/ │ │ │ │ │ ├── l2pool.rs │ │ │ │ │ ├── metric.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── vgg16_l2pool.rs │ │ │ │ │ └── weights.rs │ │ │ │ ├── lpips/ │ │ │ │ │ ├── alexnet.rs │ │ │ │ │ ├── metric.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── squeezenet.rs │ │ │ │ │ ├── vgg.rs │ │ │ │ │ └── weights.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── ms_ssim.rs │ │ │ │ ├── psnr.rs │ │ │ │ └── ssim.rs │ │ │ └── wer.rs │ │ └── renderer/ │ │ ├── base.rs │ │ ├── cli.rs │ │ ├── mod.rs │ │ └── tui/ │ │ ├── base.rs │ │ ├── controls.rs │ │ ├── full_history.rs │ │ ├── metric_numeric.rs │ │ ├── metric_text.rs │ │ ├── mod.rs │ │ ├── plot_utils.rs │ │ ├── popup.rs │ │ ├── progress.rs │ │ ├── recent_history.rs │ │ ├── renderer.rs │ │ └── status.rs │ ├── burn-vision/ │ │ ├── Cargo.toml │ │ ├── src/ │ │ │ ├── backends/ │ │ │ │ ├── cpu/ │ │ │ │ │ ├── base.rs │ │ │ │ │ ├── connected_components/ │ │ │ │ │ │ ├── spaghetti/ │ │ │ │ │ │ │ ├── Spaghetti_center_line_forest_code.rs │ │ │ │ │ │ │ ├── Spaghetti_first_line_forest_code.rs │ │ │ │ │ │ │ ├── Spaghetti_forest_labels.rs │ │ │ │ │ │ │ ├── Spaghetti_last_line_forest_code.rs │ │ │ │ │ │ │ ├── Spaghetti_single_line_forest_code.rs │ │ │ │ │ │ │ └── mod.rs │ │ │ │ │ │ └── spaghetti_4c/ │ │ │ │ │ │ ├── Spaghetti4C_center_line_forest_code.rs │ │ │ │ │ │ ├── Spaghetti4C_first_line_forest_code.rs │ │ │ │ │ │ ├── Spaghetti4C_forest_labels.rs │ │ │ │ │ │ └── mod.rs │ │ │ │ │ ├── connected_components.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── morphology/ │ │ │ │ │ │ ├── filter.rs │ │ │ │ │ │ ├── filter_engine.rs │ │ │ │ │ │ └── mod.rs │ │ │ │ │ ├── nms.rs │ │ │ │ │ └── ops.rs │ │ │ │ ├── cube/ │ │ │ │ │ ├── connected_components/ │ │ │ │ │ │ ├── hardware_accelerated.rs │ │ │ │ │ │ ├── mod.rs │ │ │ │ │ │ └── prefix_sum.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── ops.rs │ │ │ │ └── mod.rs │ │ │ ├── base.rs │ │ │ ├── lib.rs │ │ │ ├── ops/ │ │ │ │ ├── base.rs │ │ │ │ └── mod.rs │ │ │ ├── tensor.rs │ │ │ ├── tests/ │ │ │ │ └── mod.rs │ │ │ ├── transform/ │ │ │ │ ├── mod.rs │ │ │ │ └── transform2d.rs │ │ │ └── utils/ │ │ │ ├── mod.rs │ │ │ └── save.rs │ │ └── tests/ │ │ ├── common/ │ │ │ └── mod.rs │ │ ├── connected_components.rs │ │ ├── morphology.rs │ │ └── nms.rs │ └── burn-wgpu/ │ ├── Cargo.toml │ ├── README.md │ └── src/ │ └── lib.rs ├── deny.toml ├── docs/ │ └── katex-header.html ├── examples/ │ ├── custom-csv-dataset/ │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── examples/ │ │ │ ├── custom-csv-dataset.rs │ │ │ └── dataframe-dataset.rs │ │ └── src/ │ │ ├── dataframe_dataset.rs │ │ ├── dataset.rs │ │ ├── diabetes_patient.rs │ │ ├── lib.rs │ │ └── utils.rs │ ├── custom-cubecl-kernel/ │ │ ├── Cargo.toml │ │ ├── examples/ │ │ │ └── custom-cubecl-kernel.rs │ │ └── src/ │ │ ├── backward.rs │ │ ├── forward.rs │ │ ├── kernel.rs │ │ └── lib.rs │ ├── custom-image-dataset/ │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── examples/ │ │ │ └── custom-image-dataset.rs │ │ └── src/ │ │ ├── data.rs │ │ ├── dataset.rs │ │ ├── inference.rs │ │ ├── lib.rs │ │ ├── model.rs │ │ └── training.rs │ ├── custom-learning-strategy/ │ │ ├── Cargo.toml │ │ ├── examples/ │ │ │ └── custom-learning-strategy.rs │ │ └── src/ │ │ ├── lib.rs │ │ ├── model.rs │ │ └── training.rs │ ├── custom-renderer/ │ │ ├── Cargo.toml │ │ ├── examples/ │ │ │ └── custom-renderer.rs │ │ └── src/ │ │ └── lib.rs │ ├── custom-training-loop/ │ │ ├── Cargo.toml │ │ ├── examples/ │ │ │ └── custom-training-loop.rs │ │ └── src/ │ │ └── lib.rs │ ├── custom-wgpu-kernel/ │ │ ├── Cargo.toml │ │ ├── examples/ │ │ │ └── custom-wgpu-kernel.rs │ │ └── src/ │ │ ├── backward.rs │ │ ├── forward.rs │ │ ├── kernel.wgsl │ │ └── lib.rs │ ├── dop_timer/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src/ │ │ ├── event_utils.rs │ │ ├── main.rs │ │ ├── parsers.rs │ │ └── workers.rs │ ├── dqn-agent/ │ │ ├── Cargo.toml │ │ ├── examples/ │ │ │ └── dqn-agent.rs │ │ └── src/ │ │ ├── agent.rs │ │ ├── env.rs │ │ ├── lib.rs │ │ ├── training.rs │ │ └── utils.rs │ ├── guide/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── examples/ │ │ │ └── guide.rs │ │ └── src/ │ │ ├── bin/ │ │ │ ├── infer.rs │ │ │ ├── print.rs │ │ │ └── train.rs │ │ ├── data.rs │ │ ├── inference.rs │ │ ├── lib.rs │ │ ├── model.rs │ │ └── training.rs │ ├── import-model-weights/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── src/ │ │ │ ├── bin/ │ │ │ │ ├── burnpack.rs │ │ │ │ ├── convert.rs │ │ │ │ ├── pytorch.rs │ │ │ │ └── safetensors.rs │ │ │ ├── inference.rs │ │ │ ├── lib.rs │ │ │ └── model.rs │ │ └── weights/ │ │ ├── mnist.pt │ │ ├── mnist.safetensors │ │ └── mnist_train_export.py │ ├── mnist/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── cubecl.toml │ │ ├── examples/ │ │ │ └── mnist.rs │ │ └── src/ │ │ ├── data.rs │ │ ├── lib.rs │ │ ├── model.rs │ │ └── training.rs │ ├── mnist-inference-web/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── build-for-web.sh │ │ ├── index.html │ │ ├── index.js │ │ ├── run-server.sh │ │ └── src/ │ │ ├── lib.rs │ │ ├── model.rs │ │ ├── state.rs │ │ └── web.rs │ ├── modern-lstm/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── examples/ │ │ │ ├── lstm-infer.rs │ │ │ └── lstm-train.rs │ │ └── src/ │ │ ├── dataset.rs │ │ ├── inference.rs │ │ ├── lib.rs │ │ ├── model.rs │ │ └── training.rs │ ├── multi-gpus/ │ │ ├── Cargo.toml │ │ ├── examples/ │ │ │ └── multi-gpus.rs │ │ └── src/ │ │ └── lib.rs │ ├── notebook/ │ │ ├── README.md │ │ ├── autodiff.ipynb │ │ └── basic-tensor-op.ipynb │ ├── server/ │ │ ├── Cargo.toml │ │ ├── cubecl.toml │ │ ├── examples/ │ │ │ └── server.rs │ │ └── src/ │ │ └── lib.rs │ ├── simple-regression/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── examples/ │ │ │ └── regression.rs │ │ └── src/ │ │ ├── dataset.rs │ │ ├── inference.rs │ │ ├── lib.rs │ │ ├── model.rs │ │ └── training.rs │ ├── text-classification/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── cubecl.toml │ │ ├── examples/ │ │ │ ├── ag-news-infer.rs │ │ │ ├── ag-news-train.rs │ │ │ ├── db-pedia-infer.rs │ │ │ └── db-pedia-train.rs │ │ └── src/ │ │ ├── data/ │ │ │ ├── batcher.rs │ │ │ ├── dataset.rs │ │ │ ├── mod.rs │ │ │ └── tokenizer.rs │ │ ├── inference.rs │ │ ├── lib.rs │ │ ├── model.rs │ │ └── training.rs │ ├── text-generation/ │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── examples/ │ │ │ └── text-generation.rs │ │ └── src/ │ │ ├── data/ │ │ │ ├── batcher.rs │ │ │ ├── dataset.rs │ │ │ ├── mod.rs │ │ │ └── tokenizer.rs │ │ ├── lib.rs │ │ ├── model.rs │ │ └── training.rs │ └── wgan/ │ ├── Cargo.toml │ ├── README.md │ ├── examples/ │ │ ├── wgan-generate.rs │ │ └── wgan-mnist.rs │ └── src/ │ ├── dataset.rs │ ├── infer.rs │ ├── lib.rs │ ├── model.rs │ └── training.rs ├── rustfmt.toml └── xtask/ ├── Cargo.toml └── src/ ├── commands/ │ ├── books.rs │ ├── build.rs │ ├── doc.rs │ ├── mod.rs │ ├── test.rs │ └── validate.rs └── main.rs ================================================ FILE CONTENTS ================================================ ================================================ FILE: .cargo/audit.toml ================================================ # Audit config file # # It may be located in the user home (`~/.cargo/audit.toml`) or in the project # root (`.cargo/audit.toml`). # # All of the options which can be passed via CLI arguments can also be # permanently specified in this file. [advisories] ignore = [ "RUSTSEC-2024-0436", # Paste used to generate macro, should be removed at some point. "RUSTSEC-2025-0119", # `number_prefix` used by `tokenizers`, only in the examples. "RUSTSEC-2025-0141", # `bincode` is no longer maintained. "RUSTSEC-2024-0388", # `derivative` dependancy in the DQN example is unmaintained. ] # advisory IDs to ignore e.g. ["RUSTSEC-2019-0001", ...] informational_warnings = [ "unmaintained", ] # warn for categories of informational advisories severity_threshold = "low" # CVSS severity ("none", "low", "medium", "high", "critical") # Output Configuration [output] deny = ["unmaintained"] # exit on error if unmaintained dependencies are found format = "terminal" # "terminal" (human readable report) or "json" quiet = false # Only print information on error show_tree = true # Show inverse dependency trees along with advisories (default: true) [yanked] enabled = true # Warn for yanked crates in Cargo.lock (default: true) update_index = true # Auto-update the crates.io index (default: true) ================================================ FILE: .cargo/config.toml ================================================ [alias] xtask = "run --target-dir target/xtask --color always --package xtask --bin xtask --" run-checks = "xtask -c all validate --release" ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: Bug report about: Create a report to help us improve title: '' labels: '' assignees: '' --- **Describe the bug** **To Reproduce** **Expected behavior** **Screenshots** **Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] **Smartphone (please complete the following information):** - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser, safari] - Version [e.g. 22] **Additional context** ================================================ FILE: .github/ISSUE_TEMPLATE/doc_request.md ================================================ --- name: Documentation request about: Flag incoherent or missing documentation, including use case examples. title: '' labels: '' assignees: '' --- ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ================================================ --- name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' --- ### Feature description ### Feature motivation ### (Optional) Suggest a Solution ================================================ FILE: .github/PULL_REQUEST_TEMPLATE/template.md ================================================ * **Please check if the PR fulfills these requirements** - [ ] The commit message follows our guidelines - [ ] Docs have been added / updated (for bug fixes / features) * **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) * **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?) * **Other information**: ================================================ FILE: .github/dependabot.yml ================================================ version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: interval: "daily" ignore: - dependency-name: "tracel-ai/github-actions*" - package-ecosystem: "cargo" directories: - "/" - "crates/burn" - "crates/burn-*" - "crates/burn-import/*-tests" - "examples/*" - "xtask" schedule: interval: "weekly" ================================================ FILE: .github/pull_request_template.md ================================================ ## Pull Request Template ### Checklist - [ ] Confirmed that `cargo run-checks` command has been executed. - [ ] Made sure the book is up to date with changes in this PR. ### Related Issues/PRs _Provide links to relevant issues and dependent PRs._ ### Changes _Summarize the problem being addressed and your solution._ ### Testing _Describe how these changes have been tested._ ================================================ FILE: .github/workflows/combine-dependabot-prs.yml ================================================ name: Combine Dependabot PRs on: schedule: - cron: '0 6 * * MON' # Monday at 6:00am UTC workflow_dispatch: permissions: contents: write pull-requests: write checks: read jobs: combine-prs: runs-on: ubuntu-latest steps: - name: combine-prs id: combine-prs uses: github/combine-prs@v5.2.0 with: labels: dependencies,automated ================================================ FILE: .github/workflows/dependencies.yml ================================================ name: dependencies on: schedule: - cron: '0 21 * * TUE' # Run every Tuesday at 21:00 (UTC) push: tags: - 'v*.*.*' # Run when a new version is being published env: UDEPS_VERSION: "0.1.57" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: dependencies: runs-on: ubuntu-latest strategy: matrix: checks: - licenses - bans sources continue-on-error: ${{ matrix.checks == 'licenses' }} # failed licenses don't abort steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Audit Rust dependencies # If a vulnerability is found, a new issue will automatically be opened # since this action runs on main branch uses: actions-rust-lang/audit@v1 # -------------------------------------------------------------------------------- - name: Detect multiple versions of the same crate uses: EmbarkStudios/cargo-deny-action@v2 with: command: check ${{ matrix.checks }} # -------------------------------------------------------------------------------- - name: Install Rust nightly uses: dtolnay/rust-toolchain@nightly with: toolchain: nightly components: rustfmt # -------------------------------------------------------------------------------- - name: Install cargo-udeps env: UDEPS_LINK: https://github.com/est31/cargo-udeps/releases/download run: | curl -L "$UDEPS_LINK/v$UDEPS_VERSION/cargo-udeps-v$UDEPS_VERSION-x86_64-unknown-linux-gnu.tar.gz" | tar xz -C $HOME/.cargo/bin --strip-components 2 # -------------------------------------------------------------------------------- - name: Run cargo-udeps run: | cargo +nightly udeps --all-targets ================================================ FILE: .github/workflows/publish.yml ================================================ name: publish on: push: tags: - "v*" workflow_dispatch: inputs: dry-run-only: description: "Run xtask publish in dry-run mode (no publish)" type: boolean required: false default: false jobs: publish-burn-rl: needs: - publish-burn-core - publish-burn-optim # dev dependencies - publish-burn-ndarray uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-rl dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-vision: needs: - publish-burn-autodiff - publish-burn-candle - publish-burn-fusion - publish-burn-cubecl-fusion - publish-burn-cubecl - publish-burn-ndarray - publish-burn-tch - publish-burn-tensor - publish-burn-ir - publish-burn-tensor-testgen # dev dependencies - publish-burn-wgpu - publish-burn-cuda uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-vision dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-router: needs: - publish-burn-ir - publish-burn-std - publish-burn-tensor # dev dependencies - publish-burn-autodiff - publish-burn-ndarray - publish-burn-wgpu uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-router dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-remote: needs: - publish-burn-ir - publish-burn-std - publish-burn-tensor - publish-burn-router uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-remote dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-derive: uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-derive dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-dataset: needs: - publish-burn-std uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-dataset dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-std: uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-std dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-tensor-testgen: uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-tensor-testgen dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-tensor: needs: - publish-burn-tensor-testgen - publish-burn-std - publish-burn-backend uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-tensor dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-backend: needs: - publish-burn-std uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-backend dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-ir: needs: - publish-burn-tensor uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-ir dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-fusion: needs: - publish-burn-ir - publish-burn-tensor - publish-burn-std uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-fusion dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-cubecl-fusion: needs: - publish-burn-ir - publish-burn-std - publish-burn-fusion - publish-burn-tensor uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-cubecl-fusion dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-cubecl: needs: - publish-burn-ir - publish-burn-std - publish-burn-fusion - publish-burn-cubecl-fusion - publish-burn-tensor - publish-burn-ndarray uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-cubecl dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-autodiff: needs: - publish-burn-tensor - publish-burn-tensor-testgen - publish-burn-std uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-autodiff dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-tch: needs: - publish-burn-tensor - publish-burn-autodiff uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-tch dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-ndarray: needs: - publish-burn-ir - publish-burn-tensor - publish-burn-autodiff - publish-burn-std uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-ndarray dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-wgpu: needs: - publish-burn-tensor - publish-burn-autodiff - publish-burn-ndarray - publish-burn-std - publish-burn-cubecl uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-wgpu dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-cpu: needs: - publish-burn-tensor - publish-burn-fusion - publish-burn-cubecl uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-cpu dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-cuda: needs: - publish-burn-tensor - publish-burn-autodiff - publish-burn-ndarray - publish-burn-std - publish-burn-cubecl uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-cuda dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-rocm: needs: - publish-burn-tensor - publish-burn-autodiff - publish-burn-ndarray - publish-burn-std - publish-burn-cubecl uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-rocm dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-candle: needs: - publish-burn-tensor - publish-burn-autodiff - publish-burn-tch uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-candle dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-collective: needs: - publish-burn-std - publish-burn-tensor - publish-burn-communication # dev dependencies - publish-burn-wgpu - publish-burn-ndarray - publish-burn-cuda uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-collective dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-communication: needs: - publish-burn-std - publish-burn-tensor uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-communication dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-core: needs: - publish-burn-dataset - publish-burn-std - publish-burn-derive - publish-burn-tensor - publish-burn-vision # dev dependencies - publish-burn-autodiff - publish-burn-wgpu - publish-burn-tch - publish-burn-cuda - publish-burn-ndarray - publish-burn-candle - publish-burn-remote uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-core dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-nn: needs: - publish-burn-core # dev dependencies - publish-burn-autodiff - publish-burn-wgpu - publish-burn-tch - publish-burn-ndarray - publish-burn-candle - publish-burn-remote uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-nn dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-optim: needs: - publish-burn-core - publish-burn-collective # dev dependencies - publish-burn-autodiff - publish-burn-wgpu - publish-burn-tch - publish-burn-ndarray - publish-burn-candle - publish-burn-remote - publish-burn-nn uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-optim dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-train: needs: - publish-burn-core - publish-burn-optim - publish-burn-collective - publish-burn-rl - publish-burn-ndarray uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-train dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-dispatch: needs: - publish-burn-std - publish-burn-backend - publish-burn-autodiff - publish-burn-cpu - publish-burn-cuda - publish-burn-rocm - publish-burn-wgpu - publish-burn-ndarray - publish-burn-tch uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-dispatch dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn: needs: - publish-burn-core - publish-burn-nn - publish-burn-optim - publish-burn-collective - publish-burn-store - publish-burn-train - publish-burn-cpu - publish-burn-dispatch uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} publish-burn-store: needs: - publish-burn-core - publish-burn-nn - publish-burn-tensor uses: tracel-ai/github-actions/.github/workflows/publish-crate.yml@v9 with: crate: burn-store dry-run-only: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run-only || false }} secrets: CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} ================================================ FILE: .github/workflows/stale-pr.yml ================================================ name: Stale Pull Requests on: schedule: - cron: '0 12 * * *' # Run every day at 12:00 (UTC) # The minimum permissions required to run this Action permissions: contents: write # only for delete-branch option issues: write pull-requests: write jobs: stale-pr: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Stale pull requests uses: actions/stale@v10 with: # The idle number of days before marking issues stale. # # With a negative number like -1, no issues # will be marked as stale automatically. days-before-issue-stale: -1 # The idle number of days before marking pull requests stale days-before-pr-stale: 30 # The idle number of days before closing # the stale pull requests (due to the stale label). # # With a negative number like -1, the pull requests # will never be closed automatically. days-before-pr-close: -1 # Label to apply on staled pull requests stale-pr-label: 'stale' # The message that will be added as a comment to the pull request stale-pr-message: 'This PR has been marked as stale because it has not been updated for over a month' # Remove `stale` label from pull requests on updates/comments remove-pr-stale-when-updated: true ================================================ FILE: .github/workflows/test-gpu.yml ================================================ name: CI GPU on: workflow_dispatch: inputs: pr_number: description: "Number of the pull request that triggers this run if any" type: number required: false # important to set the run name to this format so that the CI server # can track the PR number from the workflow_run events. run-name: ${{ github.workflow }}:${{ github.repository }}#${{ inputs.pr_number }} env: # Note: It is not possible to define top level env vars and pass them to composite actions. # To work around this issue we use inputs and define all the env vars here. RUST_PREVIOUS_VERSION: 1.92.0 # Dependency versioning # from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml # GCP runners GCP_RUNNERS_IMAGE_FAMILY: "tracel-ci-ubuntu-2404-amd64-nvidia" GCP_RUNNERS_MACHINE_TYPE: "g2-standard-4" GCP_RUNNERS_ZONE: "us-east1-c" # Test in release mode (make it an empty string to test in debug mode) TEST_RELEASE_FLAG: "--release" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: prepare-checks: runs-on: ubuntu-latest outputs: rust-prev-version: ${{ env.RUST_PREVIOUS_VERSION }} gcp_runners_image_family: ${{ env.GCP_RUNNERS_IMAGE_FAMILY }} gcp_runners_machine_type: ${{ env.GCP_RUNNERS_MACHINE_TYPE }} gcp_runners_zone: ${{ env.GCP_RUNNERS_ZONE }} steps: - name: Do Nothing if: false run: echo linux-std-cuda-tests: needs: [prepare-checks] timeout-minutes: 60 # '@id:' label must be unique within this worklow runs-on: [ "@id:burn-cuda-job-${{github.run_id}}-${{github.run_attempt}}", "@pr_number:${{ inputs.pr_number }}", "@organization:tracel-ai", "@repository:burn", "@image-family:${{ needs.prepare-checks.outputs.gcp_runners_image_family }}", "@machine-type:${{ needs.prepare-checks.outputs.gcp_runners_machine_type }}", "@zones:${{ needs.prepare-checks.outputs.gcp_runners_zone }}", "@gpu:true", ] env: LD_LIBRARY_PATH: "/usr/local/cuda/lib64" # disable incremental compilation (reduces artifact size) CARGO_PROFILE_TEST_INCREMENTAL: "false" # Keep the stragegy to be able to easily add new rust versions if required strategy: matrix: rust: [stable] include: - rust: stable toolchain: stable steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Install Rust uses: tracel-ai/github-actions/install-rust@v9 with: rust-toolchain: ${{ matrix.toolchain }} enable-cache: false # -------------------------------------------------------------------------------- - name: Tests (burn-cuda) run: cargo xtask test ${{ env.TEST_RELEASE_FLAG }} --ci gcp-cuda-runner linux-std-vulkan-tests: needs: [prepare-checks] timeout-minutes: 60 # '@id:' label must be unique within this worklow runs-on: [ "@id:burn-vulkan-job-${{github.run_id}}-${{github.run_attempt}}", "@pr_number:${{ inputs.pr_number }}", "@organization:tracel-ai", "@repository:burn", "@image-family:${{ needs.prepare-checks.outputs.gcp_runners_image_family }}", "@machine-type:${{ needs.prepare-checks.outputs.gcp_runners_machine_type }}", "@zones:${{ needs.prepare-checks.outputs.gcp_runners_zone }}", "@gpu:true", ] env: # disable incremental compilation (reduces artifact size) CARGO_PROFILE_TEST_INCREMENTAL: "false" # Keep the stragegy to be able to easily add new rust versions if required strategy: matrix: rust: [stable] include: - rust: stable toolchain: stable steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Setup Rust uses: tracel-ai/github-actions/install-rust@v9 with: rust-toolchain: ${{ matrix.toolchain }} enable-cache: false # -------------------------------------------------------------------------------- - name: Tests (burn-vulkan) run: cargo xtask test ${{ env.TEST_RELEASE_FLAG }} --ci gcp-vulkan-runner linux-std-wgpu-tests: needs: [prepare-checks] timeout-minutes: 60 # '@id:' label must be unique within this worklow runs-on: [ "@id:burn-wgpu-job-${{github.run_id}}-${{github.run_attempt}}", "@pr_number:${{ inputs.pr_number }}", "@organization:tracel-ai", "@repository:burn", "@image-family:${{ needs.prepare-checks.outputs.gcp_runners_image_family }}", "@machine-type:${{ needs.prepare-checks.outputs.gcp_runners_machine_type }}", "@zones:${{ needs.prepare-checks.outputs.gcp_runners_zone }}", "@gpu:true", ] env: # disable incremental compilation (reduces artifact size) CARGO_PROFILE_TEST_INCREMENTAL: "false" # Keep the stragegy to be able to easily add new rust versions if required strategy: matrix: rust: [stable] include: - rust: stable toolchain: stable steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Setup Rust uses: tracel-ai/github-actions/install-rust@v9 with: rust-toolchain: ${{ matrix.toolchain }} enable-cache: false # -------------------------------------------------------------------------------- - name: Tests (burn-wgpu) run: cargo xtask test ${{ env.TEST_RELEASE_FLAG }} --ci gcp-wgpu-runner ================================================ FILE: .github/workflows/test.yml ================================================ name: CI on: push: branches: - main paths: - "Cargo.lock" - "**.rs" - "**.sh" - "**.ps1" - "**.yml" - "**.toml" - "!**.md" - "!LICENSE-APACHE" - "!LICENSE-MIT" pull_request: types: [opened, synchronize] paths: - "Cargo.lock" - "**.rs" - "**.sh" - "**.ps1" - "**.yml" - "**.toml" - "!**.md" - "!LICENSE-APACHE" - "!LICENSE-MIT" env: # Note: It is not possible to define top level env vars and pass them to composite actions. # To work around this issue we use inputs and define all the env vars here. RUST_PREVIOUS_VERSION: 1.92.0 # Dependency versioning # from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml # Mozilla Grcov GRCOV_LINK: "https://github.com/mozilla/grcov/releases/download" GRCOV_VERSION: "0.8.19" # Test in release mode (make it an empty string to test in debug mode) TEST_RELEASE_FLAG: "--release" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: prepare-checks: runs-on: ubuntu-latest outputs: rust-prev-version: ${{ env.RUST_PREVIOUS_VERSION }} steps: - name: Do Nothing if: false run: echo code-quality: runs-on: ubuntu-22.04 needs: prepare-checks strategy: matrix: rust: [stable] include: - rust: stable toolchain: stable steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Setup Rust uses: tracel-ai/github-actions/install-rust@v9 with: rust-toolchain: ${{ matrix.toolchain }} cache-key: ${{ matrix.rust }}-linux # -------------------------------------------------------------------------------- - name: Audit run: cargo xtask check audit # -------------------------------------------------------------------------------- - name: Format shell: bash env: # work around for colors # see: https://github.com/rust-lang/rustfmt/issues/3385 TERM: xterm-256color run: cargo xtask check format # -------------------------------------------------------------------------------- - name: Lint run: cargo xtask check lint # -------------------------------------------------------------------------------- - name: Typos uses: tracel-ai/github-actions/check-typos@v9 documentation: runs-on: ubuntu-22.04 needs: prepare-checks strategy: matrix: rust: [stable] include: - rust: stable toolchain: stable steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Setup Rust uses: tracel-ai/github-actions/install-rust@v9 with: rust-toolchain: ${{ matrix.toolchain }} cache-key: ${{ matrix.rust }}-linux # -------------------------------------------------------------------------------- - name: Documentation Build run: cargo xtask doc build # -------------------------------------------------------------------------------- - name: Documentation Tests run: cargo xtask doc tests linux-std-tests: runs-on: ubuntu-22.04 needs: [prepare-checks, code-quality] env: DISABLE_WGPU_SPIRV: "1" # disable incremental compilation (reduces artifact size) CARGO_PROFILE_TEST_INCREMENTAL: "false" strategy: matrix: rust: [stable, prev] include: - rust: stable toolchain: stable coverage: --enable-coverage - rust: prev toolchain: ${{ needs.prepare-checks.outputs.rust-prev-version }} steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Setup Rust uses: tracel-ai/github-actions/install-rust@v9 with: rust-toolchain: ${{ matrix.toolchain }} cache-key: ${{ matrix.rust }}-linux # Disable cache on linux-std (stable) runner which currently always runs out of disk space with tests + coverage enable-cache: ${{ matrix.rust != 'stable' }} # # -------------------------------------------------------------------------------- - name: Install grcov if: matrix.rust == 'stable' shell: bash run: | curl -L "$GRCOV_LINK/v$GRCOV_VERSION/grcov-x86_64-unknown-linux-musl.tar.bz2" | tar xj -C $HOME/.cargo/bin cargo xtask coverage install # -------------------------------------------------------------------------------- - name: Tests run: cargo xtask ${{ matrix.coverage }} test ${{ env.TEST_RELEASE_FLAG }} --ci github-runner # -------------------------------------------------------------------------------- - name: Generate lcov.info if: matrix.rust == 'stable' # /* is to exclude std library code coverage from analysis run: cargo xtask coverage generate --ignore "/*,xtask/*,examples/*" --profile release # -------------------------------------------------------------------------------- - name: Codecov upload lcov.info if: matrix.rust == 'stable' uses: codecov/codecov-action@v5 with: files: lcov.info token: ${{ secrets.CODECOV_TOKEN }} linux-no-std-tests: runs-on: ubuntu-22.04 needs: [prepare-checks, code-quality] strategy: matrix: rust: [stable, prev] include: - rust: stable toolchain: stable - rust: prev toolchain: ${{ needs.prepare-checks.outputs.rust-prev-version }} steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Setup Rust uses: tracel-ai/github-actions/install-rust@v9 with: rust-toolchain: ${{ matrix.toolchain }} cache-key: ${{ matrix.rust }}-linux-no-std # -------------------------------------------------------------------------------- - name: Crates Build run: cargo xtask --context no-std build --ci # -------------------------------------------------------------------------------- - name: Crates Tests run: cargo xtask --context no-std test ${{ env.TEST_RELEASE_FLAG }} --ci github-runner windows-std-tests: runs-on: windows-2022 needs: [prepare-checks, code-quality] # Keep the stragegy to be able to easily add new rust versions if required strategy: matrix: rust: [stable] include: - rust: stable toolchain: stable steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Setup Rust uses: tracel-ai/github-actions/install-rust@v9 with: rust-toolchain: ${{ matrix.toolchain }} cache-key: ${{ matrix.rust }}-windows # -------------------------------------------------------------------------------- - name: Tests run: cargo xtask test ${{ env.TEST_RELEASE_FLAG }} --ci github-runner macos-std-tests: runs-on: blaze/macos-15 needs: [prepare-checks, code-quality] timeout-minutes: 60 # Keep the stragegy to be able to easily add new rust versions if required strategy: matrix: rust: [stable] include: - rust: stable toolchain: stable steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Setup Rust uses: tracel-ai/github-actions/install-rust@v9 with: rust-toolchain: ${{ matrix.toolchain }} cache-key: ${{ matrix.rust }}-macos # -------------------------------------------------------------------------------- - name: Device check run: system_profiler SPHardwareDataType # -------------------------------------------------------------------------------- - name: Tests run: cargo xtask test ${{ env.TEST_RELEASE_FLAG }} --ci github-mac-runner ================================================ FILE: .github/workflows/valgrind.yml ================================================ name: valgrind on: schedule: - cron: '0 23 * * WED' # Run every Wednesday at 23:00 (UTC) concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: valgrind: runs-on: [ '@id:burn-linux-valgrind-${{ github.run_id }}-${{ github.run_attempt }}', '@image-family:ubuntu-2404-lts-amd64', '@image-project:ubuntu-os-cloud', '@disk-size:100', '@keep-alive:false', '@machine-type:n2-standard-16', '@os:linux', '@zones:northamerica-northeast1-b' ] steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Install Mesa uses: tracel-ai/github-actions/install-mesa@v9 # -------------------------------------------------------------------------------- - name: Install valgrind run: | sudo apt-get install valgrind # -------------------------------------------------------------------------------- - name: Run cargo-valgrind env: CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind -s --leak-check=full --show-leak-kinds=all --error-exitcode=1" # Looking for vulnerabilities run: | cargo test ================================================ FILE: .github/workflows/vulnerabilities.yml ================================================ name: vulnerabilities on: schedule: - cron: '0 21 * * WED' # Run every Wednesday at 21:00 (UTC) push: tags: - 'v*.*.*' env: CAREFUL_VERSION: "0.4.9" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: cargo-careful: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Install Rust nightly uses: dtolnay/rust-toolchain@nightly with: toolchain: nightly components: rustfmt, rust-src # -------------------------------------------------------------------------------- - name: Install Mesa uses: tracel-ai/github-actions/install-mesa@v9 # -------------------------------------------------------------------------------- - name: Install cargo-careful env: CAREFUL_LINK: https://github.com/RalfJung/cargo-careful/releases/download run: | curl -L "$CAREFUL_LINK/v$CAREFUL_VERSION/cargo-careful.x86_64-unknown-linux-musl" \ --output $HOME/.cargo/bin/cargo-careful chmod +x $HOME/.cargo/bin/cargo-careful # -------------------------------------------------------------------------------- - name: Run cargo-careful # Looking for undefined behaviours run: cargo +nightly careful test address-sanitizer: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Install Rust nightly uses: dtolnay/rust-toolchain@nightly with: toolchain: nightly components: rustfmt, rust-src # -------------------------------------------------------------------------------- - name: Install Mesa uses: tracel-ai/github-actions/install-mesa@v9 # -------------------------------------------------------------------------------- - name: Run AddressSanitizer env: RUSTFLAGS: -Zsanitizer=address -Copt-level=3 RUSTDOCFLAGS: -Zsanitizer=address # Looking for memory vulnerabilities run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu -- --nocapture thread-sanitizer: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Install Rust nightly uses: dtolnay/rust-toolchain@nightly with: toolchain: nightly components: rustfmt, rust-src # -------------------------------------------------------------------------------- - name: Install Mesa uses: tracel-ai/github-actions/install-mesa@v9 # -------------------------------------------------------------------------------- - name: Run ThreadSanitizer env: RUSTFLAGS: -Zsanitizer=thread -Copt-level=3 RUSTDOCFLAGS: -Zsanitizer=thread # Looking for data race among threads run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu -- --nocapture memory-sanitizer: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Install Rust nightly uses: dtolnay/rust-toolchain@nightly with: toolchain: nightly components: rustfmt, rust-src # -------------------------------------------------------------------------------- - name: Install Mesa uses: tracel-ai/github-actions/install-mesa@v9 # -------------------------------------------------------------------------------- - name: Run MemorySanitizer env: RUSTFLAGS: -Zsanitizer=memory -Zsanitizer-memory-track-origins -Copt-level=3 RUSTDOCFLAGS: -Zsanitizer=memory -Zsanitizer-memory-track-origins # Looking for unitialized memory. run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu -- --nocapture safe-stack: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v6 # -------------------------------------------------------------------------------- - name: Install Rust nightly uses: dtolnay/rust-toolchain@nightly with: toolchain: nightly components: rustfmt, rust-src # -------------------------------------------------------------------------------- - name: Install Mesa uses: tracel-ai/github-actions/install-mesa@v9 # -------------------------------------------------------------------------------- - name: Run SafeStack env: RUSTFLAGS: -Zsanitizer=safestack -Copt-level=3 RUSTDOCFLAGS: -Zsanitizer=safestack # Provides backward edge control flow protection run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu -- --nocapture ================================================ FILE: .gitignore ================================================ target # These are backup files generated by rustfmt **/*.rs.bk .DS_Store .dir-locals.el .idea .vscode .vs .fleet .ipynb_checkpoints/ # Build output directory out # Virtual Environment of Python .venv uv.lock # Nix direnv .envrc .direnv ================================================ FILE: CITATION.cff ================================================ cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Simard" given-names: "Nathaniel" email: "nathaniel.simard.42@gmail.com" - family-names: "Fortier-Dubois" given-names: "Louis" email: "louisfd94@gmail.com" - family-names: "Tadjibaev" given-names: "Dilshod" email: "dilshod@gmail.com" - family-names: "Lagrange" given-names: "Guillaume" email: "lagrange.guillaume.1@gmail.com" - name: "Burn Framework Contributors" title: "Burn" version: 0.14.0 date-released: 2024-08-27 url: "https://burn.dev/" repository-code: "https://github.com/tracel-ai/burn" license: - MIT - Apache-2.0 abstract: "Burn is a new comprehensive dynamic Deep Learning Framework built using Rust with extreme flexibility, compute efficiency and portability as its primary goals." keywords: - scientific-computing - deep-learning - machine-learning - neural-networks - rust - high-performance-computing - portability - compute-efficiency ================================================ FILE: CODE-OF-CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at nathaniel.simard.42@gmail.com. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to Burn Welcome to the Burn community! We're glad you're interested in contributing. ## How to Contribute The best way to get started is to look at [open issues](https://github.com/tracel-ai/burn/issues) and find one that interests you. Issues labeled `good first issue` are a great starting point for new contributors. If you have an idea that isn't covered by an existing issue, open one first to discuss the approach. This helps align expectations and avoids wasted effort on both sides. For questions, discussions, or just to say hello, join us on [Discord](https://discord.gg/uPEBbYYDB6). The [Contributor Book](https://burn.dev/contributor-book/) covers architecture, environment setup, and guides for common tasks. ## Pull Requests Every pull request should have a descriptive title, a description covering what you changed, why, how you tested it, and a link to the relevant issue (if applicable). Prefer small, focused PRs over large ones that bundle unrelated changes. Draft pull requests are considered not yet ready for review. CI checks should pass before requesting review, though the signal isn't always accurate. If you have questions or need early feedback, let us know on the PR or on [Discord](https://discord.gg/uPEBbYYDB6). ### Change Ownership The core principle behind all contributions: **PR authors must understand, justify, and explain every change they propose.** After a PR is accepted, both the reviewer and the author should be confident it improves the codebase. This applies equally whether you wrote the code from scratch, adapted it from another project, or used AI tools to help generate it. The origin of the code doesn't matter; what matters is that you own it intellectually and can stand behind it during review. ### AI-Assisted Contributions Using LLMs and AI tools to generate code that is part of a contribution is allowed. That said, the [Change Ownership](#change-ownership) principle applies fully. You are the author, not your AI tool. This means: - Read and understand every line before submitting. - Review AI-generated code for correctness, style consistency, and relevance. - Test your changes locally and confirm they work as intended. - Be prepared to explain the rationale behind any change during review. Do not use "AI generated" as a justification for low-quality code. ### Before You Open a PR 1. **Check for an existing issue.** If there isn't one, open an issue first to discuss the approach. This is especially important for large changes or refactors. 2. **Read the codebase.** Understand the architecture and conventions already in place. The [Contributor Book](https://burn.dev/contributor-book/) covers architecture, environment setup, and guides for common tasks. 3. **Keep it focused.** One PR should address one concern. If you spot an unrelated issue while working, open a separate PR for it. 4. **Run validation.** Run `cargo run-checks` before submitting. This runs formatting, linting, and the full test suite. All checks must pass. ### Code Quality Standards - Follow existing code style and project conventions. - Write idiomatic Rust. If you are new to the codebase, study existing patterns before contributing. - Keep dependencies minimal. Don't introduce new crates without discussion. - Document public APIs. Non-trivial logic should have comments explaining _why_, not just _what_. - Prefer clarity over cleverness. - Bug fixes should include a regression test. ### Large Pull Requests Large, complex PRs are harder to review effectively and carry more risk. To help both yourself and reviewers, consider breaking substantial changes into smaller, incremental PRs. Each should be valuable on its own, even if the full picture spans multiple PRs. Large efforts that are ultimately rejected are frustrating for everyone involved. If you're planning a substantial change, open an issue or start a discussion first. It's much easier to course-correct early than after the work is done. ### Review Process - Maintainers review PRs as time allows. Please be patient. - Be responsive to feedback. If changes are requested, address them or explain your reasoning. - Reviewers may ask clarifying questions about any part of your PR. This is a normal part of collaborative review and helps ensure shared understanding. - Don't force-push to rewrite history during an active review without notice. - If a PR goes stale for more than 14 days without a response from the author, it may be closed. ## Getting Help If you're stuck or unsure about something, don't hesitate to ask. Open an issue, start a discussion, or reach out on [Discord](https://discord.gg/uPEBbYYDB6). We're happy to help. ================================================ FILE: Cargo.toml ================================================ [workspace] # Try # require version 2 to avoid "feature" additiveness for dev-dependencies # https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2 resolver = "2" members = [ "crates/*", "crates/burn-store/pytorch-tests", "crates/burn-store/safetensors-tests", "crates/burn-collective/multinode-tests", "examples/*", "xtask", ] exclude = [ "examples/notebook", "examples/raspberry-pi-pico", "examples/dqn-agent", # gym-rs ] [workspace.package] edition = "2024" license = "MIT OR Apache-2.0" readme = "README.md" version = "0.21.0-pre.2" [workspace.lints.clippy] [workspace.lints.rustdoc] broken_intra_doc_links = "deny" invalid_html_tags = "deny" [workspace.dependencies] atomic_float = "1" axum = "0.8.8" bytemuck = "1.25.0" bytes = { version = "1.11.1", default-features = false } candle-core = { version = "0.9.2" } ciborium = { version = "0.2", default-features = false } clap = { version = "4.6.0", features = ["derive"] } colored = "3.0.0" console_error_panic_hook = "0.1.7" const-random = "0.1" csv = "1.3.1" dashmap = "6.1.0" data-encoding = { version = "2.10.0", default-features = false, features = [ "alloc", ] } dirs = "6.0.0" encoding_rs = "0.8.33" enumset = { version = "1.1.10", default-features = false } fake = "5.1.0" flate2 = "1.1.9" float-cmp = "0.10.0" futures = "0.3" futures-util = "0.3" gix-tempfile = { version = "21.0.0", features = ["signals"] } globwalk = "0.9.1" hashbrown = "0.16" hound = "3.5.1" image = "0.25.9" indicatif = "0.18.0" insta = "1.45.0" js-sys = "0.3.77" libm = "0.2.15" log = { default-features = false, version = "0.4.29" } lzma-rust2 = "0.16.2" opentelemetry = "0.31.0" opentelemetry-aws = "0.19.0" opentelemetry-otlp = "0.31.0" opentelemetry_sdk = "0.31.0" parking_lot = { version = "0.12.5", default-features = false } paste = "1" planus = { version = "=1.1" } polars = { version = "0.53.0", features = ["lazy"] } pretty_assertions = "1.4.1" proc-macro2 = "1.0.106" quote = "1.0.45" r2d2 = "0.8.10" r2d2_sqlite = "0.31.0" rayon = "1.10.0" regex = { version = "1.12.3", default-features = false, features = [ "perf", "unicode", ] } reqwest = { version = "0.12.23", default-features = false, features = [ "rustls-tls", ] } rmp-serde = { version = "1.3.1", default-features = false } rstest = "0.26.1" rusqlite = "0.37.0" sanitize-filename = "0.6.0" serde_bytes = { version = "0.11.18", default-features = false, features = [ "alloc", ] } # alloc for no_std serde_rusqlite = "0.40.0" serial_test = "3.2.0" spin = { version = "0.10.0", features = [ "mutex", "spin_mutex", "portable-atomic", ] } strum = { version = "0.28.0", features = ["derive"] } syn = { version = "2.0.111", features = ["full", "extra-traits"] } tar = "0.4.44" tempfile = "3.24.0" textdistance = { version = "1.1.1", default-features = false } thiserror = { version = "2", default-features = false } tokio = { version = "1.50.0", features = ["rt", "macros"] } tokio-tungstenite = "0.28" tokio-util = "0.7" tracing = { version = "0.1.44", default-features = false } tracing-appender = "0.2.3" tracing-core = { version = "0.1.36", default-features = false } tracing-opentelemetry = "0.32.0" tracing-subscriber = "0.3.23" zip = "8.2.0" # Persist related memmap2 = { version = "0.9" } safetensors = { version = "0.7.0", default-features = false } # Async handling async-channel = "2.5" futures-lite = { version = "2.6.1", default-features = false } # Terminal UI ratatui = "0.30.0" # WGPU stuff text_placeholder = "0.5.1" bincode = { version = "2.0.1", features = [ "alloc", "serde", ], default-features = false } # # The following packages disable the "std" feature for no_std compatibility # cfg-if = "1.0.1" derive-new = { version = "0.7.0", default-features = false } blas-src = { version = "0.14.0", default-features = false } bon = "3.8.2" half = { version = "2.7.1", features = [ "alloc", "num-traits", "serde", ], default-features = false } macerator = { version = "0.3.0" } matrixmultiply = { version = "0.3.10", default-features = false } ndarray = { version = "0.17.2", default-features = false } num-traits = { version = "0.2.19", default-features = false, features = [ "libm", ] } # libm is for no_std openblas-src = "0.10.14" rand = { version = "0.10.0", default-features = false, features = ["std_rng"] } rand_distr = { version = "0.6.0", default-features = false } serde = { version = "1.0.228", default-features = false, features = [ "derive", "alloc", ] } # alloc is for no_std, derive is needed serde_json = { version = "1.0.148", default-features = false } smallvec = { version = "1", features = ["const_generics", "const_new"] } uuid = { version = "1.22.0", default-features = false } byteorder = { version = "1.5.0", default-features = false } libc = "0.2.182" nvml-wrapper = "0.12.0" sysinfo = "0.38.0" systemstat = "0.2.6" tch = "0.22.0" torch-sys = "0.22.0" # matches what tch is using, required for lib detection ahash = { version = "0.8.12", default-features = false } portable-atomic = { version = "1.13.1" } portable-atomic-util = { version = "0.2.6", features = ["alloc"] } ### For the main burn branch. ### cubecl = { git = "https://github.com/tracel-ai/cubecl", default-features = false, rev = "20585bb73e19b16c5fb84b39923a49011b329a70" } cubecl-common = { git = "https://github.com/tracel-ai/cubecl", default-features = false, rev = "20585bb73e19b16c5fb84b39923a49011b329a70" } cubecl-zspace = { git = "https://github.com/tracel-ai/cubecl", default-features = false, rev = "20585bb73e19b16c5fb84b39923a49011b329a70" } cubek = { git = "https://github.com/tracel-ai/cubek", default-features = false, rev = "01ed48e1abb5ed117df33f4394f2c5a91c3eb97e" } ### For local development. ### # cubecl = { path = "../cubecl/crates/cubecl", default-features = false } # cubecl-common = { path = "../cubecl/crates/cubecl-common", default-features = false } # cubecl-zspace = { path = "../cubecl/crates/cubecl-zspace", default-features = false } # cubek = { path = "../cubek/crates/cubek", default-features = false } ### For the release. ### # cubecl = { version = "=0.10.0-pre.2", default-features = false } # cubecl-common = { version = "=0.10.0-pre.2", default-features = false } # cubecl-zspace = { version = "=0.10.0-pre.2", default-features = false } # cubek = { version = "=0.2.0-pre.2", default-features = false } ### For xtask crate ### tracel-xtask = "=4.13.5" # ### For local development. ### # tracel-xtask = { path = "../xtask/crates/tracel-xtask", default-features = false } [profile.dev] debug = 1 # Speed up compilation time and not necessary. ================================================ FILE: LICENSE-APACHE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2022 Nathaniel Simard & Burn Framework Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: LICENSE-MIT ================================================ MIT License Copyright (c) 2022 Nathaniel Simard & Burn Framework Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: NOTICES.md ================================================ # NOTICES AND INFORMATION This file contains notices and information required by libraries that this repository copied or derived from. ## PyTorch MNIST Example **Source**: https://github.com/pytorch/examples/blob/main/mnist/main.py License: BSD 3-Clause License Copyright (c) 2017, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## wgpu **Source:** https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml MIT License Copyright (c) 2021 The gfx-rs developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## BSL 1.0 **Source**: - https://github.com/DoumanAsh/error-code - https://github.com/DoumanAsh/clipboard-win Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## num-traits **Source:** https://github.com/rust-num/num-traits/blob/master/src/cast.rs MIT License Copyright (c) 2014 The Rust Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## RP **Source**: - https://github.com/embassy-rs/embassy/blob/main/examples/rp/Cargo.toml - https://github.com/embassy-rs/embassy/blob/main/examples/rp/build.rs - https://github.com/embassy-rs/embassy/blob/main/examples/rp/memory.x Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright (c) Embassy project contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. MIT license Copyright (c) Embassy project contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## github-device-flow **Source**: - Part of: https://github.com/jakewilkins/gh-device-flow/blob/main/src/lib.rs - https://github.com/jakewilkins/gh-device-flow/blob/main/src/util.rs MIT License Copyright (c) 2022 Jake Wilkins Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## Candle - Pickle Reader **Source**: https://github.com/huggingface/candle/blob/main/candle-core/src/pickle.rs This project includes code from Candle by Hugging Face, licensed under both MIT and Apache 2.0 licenses. **MIT License**: https://github.com/huggingface/candle/blob/main/LICENSE-MIT MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **Apache License 2.0**: https://github.com/huggingface/candle/blob/main/LICENSE-APACHE Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ## ICU UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE Copyright © 2016-2024 Unicode, Inc. NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. Permission is hereby granted, free of charge, to any person obtaining a copy of data files and any associated documentation (the "Data Files") or software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that either (a) this copyright and permission notice appear with all copies of the Data Files or Software, or (b) this copyright and permission notice appear in associated Documentation. THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. ================================================ FILE: POEM.md ================================================ # BURN: Burn Unstoppable Rusty Neurons In the realm of circuits and code, A fiery forge ignites to bear its load, A framework born, BURN it be named, Unstoppable Rusty Neurons, untamed. From silicon synapses, connections spire, A digital cortex, setting minds afire, In the vast expanse of deep learning's sea, A beacon of progress, BURN comes to be. Oh, rusty neurons, forged in the flame, Unyielding in purpose, undaunted by name, Through layers of logic and intricate art, You weave and entwine, each playing its part. With algorithms profound, and data refined, In ceaseless pursuit of knowledge to find, BURN paves a path to enlightenment, bright, A testament to the wonders of human foresight. In neural networks deep, where wisdom resides, The dance of nodes and edges presides, With loss and gradients, BURN takes its stride, A journey towards truth, with AI as our guide. No barriers hold back the curious mind, As BURN seeks the answers we yearn to find, Unstoppable, relentless, in pursuit of the unknown, Our collective intellect, within it, has grown. So sing we the praises of BURN's fiery might, An ode to the sparks that set the dark alight, To the rusty neurons, unstoppable and true, A testament to the power of dreams, to breakthrough. (ChatGPT (model=gpt-4) with prompt: Write a poem about "BURN: Burn Unstoppable Rusty Neurons" deep learning neural network framework) ================================================ FILE: README.md ================================================
[](https://discord.gg/uPEBbYYDB6)
[](https://crates.io/crates/burn)
[](https://crates.io/crates/burn)
[](https://burn.dev/docs/burn)
[](https://github.com/tracel-ai/burn/actions/workflows/test.yml)
[](#license)
[](https://deepwiki.com/tracel-ai/burn)
[
](https://www.runblaze.dev)
---
**Burn is a next generation Tensor Library and Deep Learning Framework that doesn't compromise on
Burn strives to be as fast as possible on as many hardwares as possible, with robust
implementations. We believe this flexibility is crucial for modern needs where you may train your
models in the cloud, then deploy on customer hardwares, which vary from user to user.
The whole deep learning workflow is made easy with Burn, as you can monitor your training progress
with an ergonomic dashboard, and run inference everywhere from embedded devices to large GPU
clusters.
Burn was built from the ground up with training and inference in mind. It's also worth noting how
Burn, in comparison to frameworks like PyTorch, simplifies the transition from training to
deployment, eliminating the need for code changes.
Just heard of Burn? You are at the right place! Just continue reading this section and we hope you
can get on board really quickly.
If you are excited about the project, don't hesitate to join our
[Discord](https://discord.gg/uPEBbYYDB6)! We try to be as welcoming as possible to everybody from
any background. You can ask your questions and share what you built with the community!
================================================
FILE: burn-book/src/basic-workflow/data.md
================================================
# Data
Typically, one trains a model on some dataset. Burn provides a library of very useful dataset
sources and transformations, such as Hugging Face dataset utilities that allow to download and store
data into an SQLite database for extremely efficient data streaming and storage. For this guide
though, we will use the MNIST dataset from `burn::data::dataset::vision` which requires no external
dependency.
To iterate over a dataset efficiently, we will define a struct which will implement the `Batcher`
trait. The goal of a batcher is to map individual dataset items into a batched tensor that can be
used as input to our previously defined model.
Let us start by defining our dataset functionalities in a file `src/data.rs`. We shall omit some of
the imports for brevity, but the full code for following this guide can be found at
`examples/guide/` [directory](https://github.com/tracel-ai/burn/tree/main/examples/guide).
```rust , ignore
use burn::{
data::{dataloader::batcher::Batcher, dataset::vision::MnistItem},
prelude::*,
};
#[derive(Clone, Default)]
pub struct MnistBatcher {}
```
This batcher is pretty straightforward, as it only defines a struct that will implement the
`Batcher` trait. The trait is generic over the `Backend` trait, which includes an associated type
for the device, as not all backends expose the same devices. As an example, the Libtorch-based
backend exposes `Cuda(gpu_index)`, `Cpu`, `Vulkan` and `Metal` devices, while the ndarray backend
only exposes the `Cpu` device.
Next, we need to actually implement the batching logic.
```rust , ignore
# use burn::{
# data::{dataloader::batcher::Batcher, dataset::vision::MnistItem},
# prelude::*,
# };
#
# #[derive(Clone, Default)]
# pub struct MnistBatcher {}
#
#[derive(Clone, Debug)]
pub struct MnistBatch
Although we have conveniently implemented the
[`MnistDataset`](https://github.com/tracel-ai/burn/blob/main/crates/burn-dataset/src/vision/mnist.rs)
used in the guide, we'll go over its implementation to demonstrate how the `Dataset` and `Batcher`
traits are used.
The [MNIST dataset](http://yann.lecun.com/exdb/mnist/) of handwritten digits has a training set of
60,000 examples and a test set of 10,000 examples. A single item in the dataset is represented by a
\\(28 \times 28\\) pixels black-and-white image (stored as raw bytes) with its corresponding label
(a digit between \\(0\\) and \\(9\\)). This is defined by the `MnistItemRaw` struct.
```rust, ignore
# #[derive(Deserialize, Debug, Clone)]
struct MnistItemRaw {
pub image_bytes: Vec