Skip to content

Conversation

@ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Jun 7, 2024

What is broken / not supported by Numba:

The plan now

  • Numba becomes a default dependency
  • Like the default "Mode", "FAST_RUN" is now also an abstract mode that can use either C or Numba, depending on config.linker
    • For now "config.linker" will remain C (specifically CVM) but we'll switch to Numba soon.
    • Why Numba over C?
      • Faster
      • Easier to maintain/ extend
      • Easier to install (pip install should be safe
    • This way downstream libraries can test if anything would break with the switch, and user can switch back if it breaks stuff for them
    • CI will run with both configs. To avoid runtime explosion it may be time to restrict floatX and fast_compile tests to a few files instead of being an orthogonal parametrization like it is now

Immediate action

  • I'll be cherry picking the countless fixes into their own PRs. I need help with review as both me and @jessegrabowski are pretty much at capacity Done
  • This PR will end up with just the test tweaks and new config flags
  • We need to implement more Ops in numba mode. We'll follow up with a PR that fails on fallback to obj mode. Help needed!

@ricardoV94 ricardoV94 force-pushed the test_on_numba branch 2 times, most recently from 2eb7fe7 to 1f093cd Compare June 7, 2024 17:24
@ricardoV94
Copy link
Member Author

Locally I ran all the tests in tests/tensor/rewriting/test_basic.py twice (to allow caching) before and after making Numba default.
Before: 6s
After: 1m34s

Numba caching is baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad

@ricardoV94

This comment was marked as outdated.

@ricardoV94 ricardoV94 changed the title Test on numba Run whole test suite on numba backend Jun 7, 2024
@aseyboldt

This comment was marked as outdated.

@ricardoV94

This comment was marked as outdated.

@ricardoV94

This comment was marked as outdated.

@ricardoV94

This comment was marked as outdated.

@ricardoV94 ricardoV94 force-pushed the test_on_numba branch 4 times, most recently from 6f6e8bb to 53d9a26 Compare June 13, 2024 14:43
@ricardoV94 ricardoV94 added this to the 3.0 release milestone Feb 14, 2025
@ricardoV94
Copy link
Member Author

After caching the test file now runs in 50s after caching vs 6s before the PR, so only 8x slower now :(

@ricardoV94 ricardoV94 marked this pull request as ready for review December 14, 2025 18:11
@ricardoV94
Copy link
Member Author

ricardoV94 commented Dec 14, 2025

The build test is failing with llvm/numba, seems to be trying to build wheel for free threaded python? Do we have a way to skip that, if that's even the problem.

llvmlite/numba don't yet support it (and probably neither do I even if we built for it)

@maresb
Copy link
Contributor

maresb commented Dec 14, 2025

@ricardoV94, just pushed a commit that hopefully solves it

@ricardoV94
Copy link
Member Author

ricardoV94 commented Dec 15, 2025

@maresb / @lucianopaz I requested your review basically for the last 2 commits, where we make numba default dependency and run it on the CI

The prior commits is just tweaking tests so they pass with both backends. I've gone over them with @jessegrabowski and asked him to review those. Feel free to look if you want but nothing terribly interesting or critical there

@ricardoV94
Copy link
Member Author

ricardoV94 commented Dec 15, 2025

@maresb I force-pushed above your commit, sorry didn't see you had come to the rescue already.

My changes above yours:
image

should we go with cp*t-*? Mine is too myopic on the python version, and yours is harder to read?
I'll reintroduce your comment.
The test-skip changes I did is because it seemed outdated or redundant from the skip entries. WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Give test matrix readable names

3 participants