Commit Graph

1337 Commits

Author SHA1 Message Date
Arthur Brussee 47a81270e1
Make autodiff compile on wasm (#1889) 2024-06-14 08:12:14 -04:00
Nathaniel Simard 5e58ae1a02
Refactor the tuner to be used standalone (#1884)
* Refactor the tuner to be used standalone

* Add a name for the autotune cache

* Fix tests

* Fix typo
2024-06-13 13:23:58 -04:00
Jonathan Richard 5de1517232
Add documentation to burn core nn (#1746)
* Updated documentation for unfold4d

Added links between the struct and the config. Added a link to the related burn_tensor function in the documentation for the forward function.

* Changing nn relu module documentation to functional api

Removing the formula for relu from the module API to the functional API,
citing a paper relevant to relu
and mentionning the functional API in the module API

* Linking gelu module API documentation to functional API documentation

* Linear module : adding documentation

Adding documentation to the Linear module
mentionning that LinearConfig struct
should be used when creating a Linear Layer

Also adding links to the documentation that points people toward
the right path

* Updated documentation for dropout

Added links between the struct and the config. Added a link to the struct in the forward function for more info.

* embedding + swiglu

* RotaryEncodying : adding documentation

Adding documentation stating the RotaryEncoding should be created using a RotaryEncodingConfig

* prelu: adding documentation

Adding documentation to the prelu module:
- Linking forward function documentation to the functional API
- Citing the first paper to mention prelu
- Adding documentation saying that prelu layer should be created using PReluConfig

* pos_encoding: adding documentation

* Updated documentation for mha

Added links for more info. Added shape info at some places.

* docs: Add documentation for Gru module

Provide documentation for the Gru module, including its configuration and usage. Include a link to the paper that introduced the Gated Recurrent Unit (GRU) and specify that the module should be created using GruConfig. Also, mention that the forward function returns a state tensor with specific dimensions.

* burn-core-nn-transformers: adding documentation

Adding documentation:
- Says to use config to create the layers
- Add mathematical formula to the pwff forward pass
- Add citation in the pwff to the "Attention is all you need" paper

* Updated documentation: ConvTranspose1d and ConvTranspose2d

* docs: Add documentation for Lstm and BiLstm modules

Provide documentation for the Lstm and BiLstm modules, including their configurations and usage. Include links to the papers that introduced Long Short-Term Memory (LSTM) and Bidirectional LSTM. Specify that the modules should be created using LstmConfig and BiLstmConfig respectively.

* docs: Update documentation for ConvTranspose1d and ConvTranspose2d modules

* loss: Adding documenntation to the loss layers

Adding documentation stating to use the config to create the layer

* chore: Refactor Conv1d module imports and update documentation

* docs: Add documentation for AdaptiveAvgPool1d and AdaptiveAvgPool2d modules

Added references to the burn_tensor associated functions. Added links between the struct and the config.

* Refactor Conv1d module imports and update documentation

* chore: Refactor Conv2d module imports and update documentation

* Add documentation for AvgPool1d and AvgPool2d modules

Added references to the burn_tensor associated functions. Added links between the struct and the config.

* Add documentation for MaxPool1d and MaxPool2d modules

Added references to the burn_tensor associated functions. Added links between the struct and the config.

* Add documentation for leaky_relu and removed Config generic

Added references to the burn_tensor associated functions. Added links between the struct and the config. Removed the backend generic from the config since it's not needed (might be a breaking change).

* refactor: Update BatchNormConfig initialization and add documentation.

* Added link to config in embedding struct documentation

* refactor: Update GroupNormConfig initialization and add documentation

* refactor: Update InstanceNormConfig initialization and add documentation

* feat: Update LayerNormConfig initialization and add documentation

* refactor: Update RmsNormConfig initialization and add documentation

* fixed: removed #derive accidentally

* Added missing backticks in pools' shapes

* Format nn doc

* Make config fields public in nn modules

* Update import statements in nn modules

Changed burn_tensor imports to crate::tensor

* Update import statements in nn modules' tests

Changed burn_tensor imports to crate::tensor

* breaking change refactor: Update GroupNormConfig and InstanceNormConfig initialization

* Make SwiGlu fields public

* grammar

* slashes

* input tensors grouping

* copy-pasta mistake

* a not an >:I

* Capitalization

* better desc

* math 'n ticks

* group_norm functional implementation

* removed the ... struct

* decoder typo

* fmt

* referring to private fn in docs

---------

Co-authored-by: Thierry Cantin-Demers <piertcd@gmail.com>
Co-authored-by: mepatrick73 <pameu17@ulaval.ca>
2024-06-13 12:50:21 -04:00
Louis Fortier-Dubois 4393b336bc
clippy on rust update (#1886) 2024-06-13 12:15:15 -04:00
Arthur Brussee c873d87ac8
Add option to flush queue instead of waiting for completion. (#1864)
* Make sync_type an option on sync instead of adding submit
2024-06-13 09:56:08 -04:00
Mitchell Mosure 71bd5efbfa
feat: resize onnx import (#1863)
* feat: resize onnx import

* fix: resize import proc macro output

* fix: lint

* fix: simplify resize onnx

* fix: onnx-tests passing

* feedback: remove dead code and resolve merge conflicts
2024-06-11 13:22:33 -04:00
jachym 671ec8c679
feat: added slice onnx import (#1856)
* feat: added slice onnx import

* fix: axes, steps handling
2024-06-11 07:50:03 -04:00
github-actions[bot] dd60446946
Combined PRs (#1874)
* Bump cudarc from 0.11.0 to 0.11.4

Bumps [cudarc](https://github.com/coreylowman/cudarc) from 0.11.0 to 0.11.4.
- [Release notes](https://github.com/coreylowman/cudarc/releases)
- [Commits](https://github.com/coreylowman/cudarc/compare/v0.11.0...v0.11.4)

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

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

* Bump clap from 4.5.4 to 4.5.6

Bumps [clap](https://github.com/clap-rs/clap) from 4.5.4 to 4.5.6.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.4...v4.5.6)

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

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

* Bump tar from 0.4.40 to 0.4.41

Bumps [tar](https://github.com/alexcrichton/tar-rs) from 0.4.40 to 0.4.41.
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.40...0.4.41)

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

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

* Bump strum_macros from 0.26.2 to 0.26.4

Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.26.2 to 0.26.4.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

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

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

* Bump zip from 2.1.2 to 2.1.3

Bumps [zip](https://github.com/zip-rs/zip2) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zip-rs/zip2/compare/v2.1.2...v2.1.3)

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

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-10 16:22:08 -04:00
Joshua Ferguson effce28b72
Optimize argument handling and improve ONNX graph building (#1857)
* draft for alternative burn import design

* passes onnx test, fails to build example

* pushing to test example on main

* fixed the issue with the example

* passes the test now

* spring cleaning and minor code changes

* removed pub visibility from most graph_data fields and functions

* comment fixes

* went ahead and removed the constant check for now

* removed unused function arg
2024-06-10 14:06:54 -05:00
towerpark 9a32e53e65
Book: Fix typos in the name of MessagePack format (#1868)
In the Record page, there are 4 places where "Pack" is written as
"Park." Also, the fix makes them the same as the official name, which
has no space and is in CamelCase.

Co-authored-by: towerpark <t56ouhw1d@mozmail.com>
2024-06-10 13:30:53 -04:00
Louis Fortier-Dubois de5b681b18
Cube: Vectorization + simple matmul implementation (#1866) 2024-06-07 14:05:51 -04:00
Arthur Brussee 4b174a88bd
Get resources from server (#1861) 2024-06-06 17:33:57 -04:00
Arthur Brussee 75e26d03c3
Speedup client.create for small allocations. (#1858)
* Speedup client.create for small allocations.
2024-06-06 17:09:01 -04:00
Arthur Brussee 675f6b3280
Make Param.id public (#1859)
* Make Param.id public

* Remove extra comment.
2024-06-06 11:03:14 -04:00
Icekey d28183c7e4
LearnerBuilder "with_checkpointing_strategy" should use builder pattern (#1841) 2024-06-05 07:55:44 -04:00
Arthur Brussee e0a1094f89
Add a feature to initialize from an existing wgpu adapter/device/queue (#1788)
* Add a feature to initialize from an existing wgpu adapter/device/queue

This is useful when interacting with other wgpu applications (eg. displaying a burn tensor as a texture in egui). The existing devices are keyed by the wgpu Device ID. Alternatively they could be keyed per adapter which would be more inline with other burn WgpuDevice's (one per adapter), but also there's no real inherent reason to.

This also involves making Queue into an Arc. Alternatively, this could give up ownership of the queue, but it's helpful to be able to synchronize burn operations and custom wgpu operations.
2024-06-05 07:19:52 -04:00
mepatrick73 36ed65a5cd
Feat/dynamic mm basic implementation + small refactor (#1844) 2024-06-04 17:01:33 -04:00
Louis Fortier-Dubois c42abadfe9
Cube: CubeType (no launch) and Comptime::map (#1853) 2024-06-04 13:43:43 -04:00
jachym a5af19b959
feat: add sum onnx import (#1846) 2024-06-03 15:30:44 -05:00
github-actions[bot] 8a950c667b
Combined PRs (#1852)
* Bump proc-macro2 from 1.0.84 to 1.0.85

Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.84 to 1.0.85.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.84...1.0.85)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Bump syn from 2.0.65 to 2.0.66

Bumps [syn](https://github.com/dtolnay/syn) from 2.0.65 to 2.0.66.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.65...2.0.66)

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

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

* Bump zip from 2.1.1 to 2.1.2

Bumps [zip](https://github.com/zip-rs/zip2) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zip-rs/zip2/compare/v2.1.1...v2.1.2)

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

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

* Bump serde from 1.0.202 to 1.0.203

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.202 to 1.0.203.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.202...v1.0.203)

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

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

* Bump anyhow from 1.0.83 to 1.0.86

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.83 to 1.0.86.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.83...1.0.86)

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

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-03 12:41:02 -04:00
Louis Fortier-Dubois 5edaeabcee
Feat/cube/struct support (#1842)
* struct support (receive, use and modify fields)

* support struct with generics

* expect instead of unwrap

* fmt

* rename struc

* fmt

* Clippy

* Fix launcher

* Support creating private cube type without generics

* Cleanup

* generics support

* clippy

* minor

* fmt

---------

Co-authored-by: nathaniel <nathaniel.simard.42@gmail.com>
2024-06-03 12:19:05 -04:00
Mathias Insley 92b0067693
Feat/gather import (#1843)
* Move and redirect GatherElements to new folders/nodes

* Create PyTorch script for gather

* Add onnx file for gather

* Add a gather test to onnx_tests

* Update gather.rs to use select

* Rename codegen test

* Update gather and gather_elements conversion functions

* Validate rank of input node and update output

* Add check for Gather
2024-06-03 08:28:32 -04:00
Zirconium409122 e407c76def
Remainder operator doc (#1836)
* Adds remainder ops implementation for Tensor.

* Adds test for % operator.

* Add remainder and % operator entry in tensor.md

---------

Co-authored-by: Jonas Kantic <jk.mail@posteo.net>
2024-06-01 16:49:54 -05:00
Jonas Kantic fba1e27e0c
Remainder operator (#1726)
* Adds remainder ops implementation for Tensor.

* Adds test for % operator.
2024-06-01 16:47:02 -05:00
jachym.putta 99e1ba4864
feat: expand onnx import (#1813)
* feat: added expand to import
2024-05-31 16:48:02 -05:00
jachym.putta 44f1053219
feat: added range onnx import (#1834)
* feat: added range onnx import

* fix: range input types
2024-05-31 16:40:54 -05:00
Nathaniel Simard 36d4bcd705
[Refactor - Breaking] Refactor cube operations with better names & Support subgroup operations (#1839) 2024-05-31 17:07:21 -04:00
will-maclean 13a6f84bc3
Feature/onnx argmax (#1814)
* pre-test

* implementing argmax for burn-import from onnx

* tidying

* fixing return types and tests

* addressing feedback

* only warn when select_last_index!=0
2024-05-31 14:46:09 -04:00
Louis Fortier-Dubois de0b49e4a3
Cube: Topology constants (#1838)
---------

Co-authored-by: nathaniel <nathaniel.simard.42@gmail.com>
2024-05-30 12:03:30 -04:00
Guillaume Lagrange 0d4374cfd4
Update to zip 2.1.1 (#1837) 2024-05-29 10:52:39 -04:00
Louis Fortier-Dubois 61c9fdbbc8
Cube: cleaner use of topology values (#1835)
* constant keyword parsing

* works
2024-05-29 09:08:10 -04:00
McArthur a2ad424fc8
Indices Operator (#1735) 2024-05-29 09:05:31 -04:00
Louis Fortier-Dubois cacc764205
Cube: support for shared memory (#1831) 2024-05-29 08:22:04 -04:00
Guillaume Lagrange e4836241e1
Fix `DataSerialize` conversion for elements of the same type (#1832) 2024-05-28 18:12:44 -04:00
Nathaniel Simard 912ffb4a81
Fix wasm examples (#1824) 2024-05-28 17:51:20 -04:00
Louis Fortier-Dubois e61b026918
Cube: support method call + prettier tensor metadata (#1829) 2024-05-27 15:18:17 -04:00
Nathaniel Simard fd54a8b470
Add vectorization support into cube (#1830) 2024-05-27 14:21:29 -04:00
Louis Fortier-Dubois dc85daa1c6
Cube: support for return + conv2d early return (#1828) 2024-05-27 13:19:00 -04:00
Nathaniel Simard 15d2055de8
Feat/cube/launch (#1827) 2024-05-27 12:15:06 -04:00
Nathaniel Simard c59a3b8b8a
Fix bench load record benchmarks (#1826) 2024-05-27 10:29:09 -04:00
Adrian Müller cccd96de48
Feat: Implement ONNX RandomUniform + RandomNormal in burn-import (#1806) 2024-05-27 10:07:04 -04:00
github-actions[bot] 85ba167582
Combined PRs (#1823)
* Bump cudarc from 0.10.0 to 0.11.0

Bumps [cudarc](https://github.com/coreylowman/cudarc) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/coreylowman/cudarc/releases)
- [Commits](https://github.com/coreylowman/cudarc/compare/v0.10.0...v0.11.0)

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

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

* Bump libc from 0.2.154 to 0.2.155

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.154 to 0.2.155.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.154...0.2.155)

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

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

* Bump ratatui from 0.26.2 to 0.26.3

Bumps [ratatui](https://github.com/ratatui-org/ratatui) from 0.26.2 to 0.26.3.
- [Release notes](https://github.com/ratatui-org/ratatui/releases)
- [Changelog](https://github.com/ratatui-org/ratatui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ratatui-org/ratatui/compare/v0.26.2...v0.26.3)

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

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

* Bump bytemuck from 1.15.0 to 1.16.0

Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.15.0 to 1.16.0.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.15.0...v1.16.0)

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

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

* Bump proc-macro2 from 1.0.83 to 1.0.84

Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.83 to 1.0.84.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.83...1.0.84)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-27 10:04:27 -04:00
Ikko Eltociear Ashimine 1c5e65ab26
docs: update README.md (#1810)
minor fix
2024-05-27 09:21:03 -04:00
Nathaniel Simard c7ad25ab60
Update cuda-jit (#1799) 2024-05-24 11:31:47 -04:00
Louis Fortier-Dubois 23c622a9f8
Feat/cube/remaining ops (#1807) 2024-05-24 09:48:34 -04:00
Justin Restivo 1670a71711
Fix burn-jit compile error (#1803) 2024-05-23 20:24:42 -04:00
jachym.putta ef4646c90f
feat: Greater + GreaterOrEqual onnx import (#1801) 2024-05-23 08:59:15 -04:00
jachym.putta 1f31e20ce8
feat: Less + LessOrEqual onnx import (#1800) 2024-05-23 08:04:44 -04:00
Louis Fortier-Dubois e39b4d2da0
refactor reduce into separate traits (#1798) 2024-05-22 16:01:27 -04:00
Louis Fortier-Dubois 033171920c
Cube: first ported kernel + comptime support + variable reuse + cleanup (#1797) 2024-05-22 14:08:21 -04:00