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

Add type-stability checks via DispatchDoctor.jl #683

Open
avik-pal opened this issue Jun 5, 2024 · 1 comment
Open

Add type-stability checks via DispatchDoctor.jl #683

avik-pal opened this issue Jun 5, 2024 · 1 comment
Labels
enhancement New feature or request performance
Milestone

Comments

@avik-pal
Copy link
Member

avik-pal commented Jun 5, 2024

  1. We can't apply it to the entire Lux module. Some of the code exists for debugging and is intentionally type unstable.
  2. I like the default of erroring, but that will be too breaking. Maybe we can consider that for v0.6. We will warn if the code is type unstable for now.

Repository: https://github.com/MilesCranmer/DispatchDoctor.jl

@avik-pal avik-pal added enhancement New feature or request performance labels Jun 5, 2024
@avik-pal avik-pal mentioned this issue Jun 26, 2024
32 tasks
@avik-pal avik-pal added this to the v0.6 milestone Jun 28, 2024
@avik-pal
Copy link
Member Author

avik-pal commented Jul 4, 2024

We can do it at multiple levels:

  1. apply: this is the most aggressive one Check what happens if we enable Dispatch Checks at apply LuxCore.jl#28
  2. In the LuxLib _impl functions: It makes sense to guarantee these ones to be type stable feat: using dispatch doctor for return type stability guarantees LuxLib.jl#79
  3. In Lux applychain, applyparallel, ... functions which get hit pretty commonly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

No branches or pull requests

1 participant