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

MAINT: update @jit(nopython=True) to @jit with numba>=0.59 #395

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mmcky
Copy link
Contributor

@mmcky mmcky commented May 8, 2024

This PR updates njit to use jit now that numba>=0.59 and nopython=True is now the default behaviour of the jit

This resolves QuantEcon/meta#112 for this lecture series

@mmcky
Copy link
Contributor Author

mmcky commented May 8, 2024

  • checked support files in _static/lecture_specific
  • link checker is false positive

Copy link

github-actions bot commented May 9, 2024

@mmcky
Copy link
Contributor Author

mmcky commented May 9, 2024

There are a few speed regressions when applying these changes (right is this PR, left is current live site)

Screenshot 2024-05-09 at 11 45 20 AM

@kp992 would you have any time to review this and see what might be causing the slowdown in execution speed?

@kp992
Copy link
Contributor

kp992 commented May 9, 2024

@kp992
Copy link
Contributor

kp992 commented May 9, 2024

Hmm, I guess there can 2 reasons behind this:

  1. We are using GPU which calls cuda.jit internally in numba and the docs are just talking about CPU options.
  2. Maybe the cache isn't updated and so the execution time has increased?

@mmcky
Copy link
Contributor Author

mmcky commented Jun 13, 2024

@kp992 I don't fully understand your comments.

We are using GPU which calls cuda.jit internally in numba and the docs are just talking about CPU options.

This PR is strictly update the Numba jit so I don't understand why GPU is involved?

Maybe the cache isn't updated and so the execution time has increased?

For any lecture that has had code change then the cache should be invalidated and the lecture is run fresh.

Perhaps we can link up and discuss this?

@kp992
Copy link
Contributor

kp992 commented Jun 16, 2024

Thanks @mmcky, I can try looking into it in more details and discuss on this.

@kp992
Copy link
Contributor

kp992 commented Jun 24, 2024

@mmcky Can we re-run and see if the time results still differ? Maybe sometimes we might have hit some outlier?

@mmcky mmcky closed this Jun 26, 2024
@mmcky mmcky reopened this Jun 26, 2024
@mmcky
Copy link
Contributor Author

mmcky commented Jun 26, 2024

@kp992 there are still large differences:

Screenshot 2024-06-26 at 2 18 01 PM

@kp992
Copy link
Contributor

kp992 commented Jun 27, 2024

I will try to debug what's creating these differences.

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

Successfully merging this pull request may close these issues.

Track Changes in @jit in Numba Version0.59.0.
2 participants