Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move more repeated functions and traits into burn-common crate #945

Closed
4 tasks
Luni-4 opened this issue Nov 10, 2023 · 4 comments
Closed
4 tasks

Move more repeated functions and traits into burn-common crate #945

Luni-4 opened this issue Nov 10, 2023 · 4 comments
Labels
enhancement Enhance existing features

Comments

@Luni-4
Copy link
Collaborator

Luni-4 commented Nov 10, 2023

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:

  1. Find all repeated functions and traits definition scattered through burn crates
  2. Move all of them in burn-common crate
  3. Replace the repeated functions and traits call with the ones contained in the burn-common crate
  4. Optimize these functions with #[inline] and #[inline(always)] attributes
@Luni-4 Luni-4 changed the title Create burn-util crate Create burn-utils crate Nov 10, 2023
@nathanielsimard
Copy link
Member

nathanielsimard commented Nov 10, 2023

@Luni-4 We already have burn-common for stuff that is shared between crates, maybe we should move some repeated functions there!

@Luni-4
Copy link
Collaborator Author

Luni-4 commented Nov 10, 2023

@nathanielsimard

Thank you for pointing me to the right directory! Yeah, we can use burn-common an apply the strategy described above. I agree!

@Luni-4 Luni-4 changed the title Create burn-utils crate Move more repeated functions and traits into burn-common crate Nov 10, 2023
@antimora antimora added the enhancement Enhance existing features label Nov 19, 2023
@antimora
Copy link
Collaborator

Closing it as too open ended. We will do as we refactor one by one.

@Luni-4
Copy link
Collaborator Author

Luni-4 commented Mar 29, 2024

Yep, I agree, thanks @antimora!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhance existing features
Projects
None yet
Development

No branches or pull requests

3 participants