burn
burn copied to clipboard
Move more repeated functions and traits into `burn-common` crate
Feature description
The burn-common crate should contain all those functions and traits which are repedetely used within all the other burn crates. These functions can be used for tests and benchmarks contexts as well,
Feature motivation
To reduce boilerplates and avoid repetitions in the code. In addition, this crate can expose some of these methods and traits as public APIs such that other projects can use them as well.
(Optional) Suggest a Solution
Possible strategy to improve burn-common crate:
- [ ] Find all repeated functions and traits definition scattered through
burncrates - [ ] Move all of them in
burn-commoncrate - [ ] Replace the repeated functions and traits call with the ones contained in the
burn-commoncrate - [ ] Optimize these functions with
#[inline]and#[inline(always)]attributes
@Luni-4 We already have burn-common for stuff that is shared between crates, maybe we should move some repeated functions there!
@nathanielsimard
Thank you for pointing me to the right directory! Yeah, we can use burn-common an apply the strategy described above. I agree!
Closing it as too open ended. We will do as we refactor one by one.
Yep, I agree, thanks @antimora!