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

Improve speed of reduced set models #544

Open
maedoc opened this issue Apr 1, 2022 · 4 comments
Open

Improve speed of reduced set models #544

maedoc opened this issue Apr 1, 2022 · 4 comments
Labels
area/scilib enhancement New feature or request good first issue Good for newcomers

Comments

@maedoc
Copy link
Member

maedoc commented Apr 1, 2022

Describe the new feature or enhancement

The reduced set models are quite slow and should be improved as with other models in the TVB library.

Describe your proposed implementation

The dfun implementations can be replaced by Numba functions with explicit loops, which will provide an immediate speed up with the default backend.

Describe possible alternatives

The differential equations could annotated as with the MPR model to make them compatible with the Numba code gen backend. The backend may need to be taught to generate code for the mode coupling.

Additional comments

Following a request from the TVB list this morning, cf https://groups.google.com/g/tvb-users/c/GovsAb-xc1k/m/vCTOQcd_FAAJ

@maedoc maedoc added enhancement New feature or request good first issue Good for newcomers area/scilib labels Apr 1, 2022
@peeplika
Copy link

peeplika commented Jan 3, 2024

Hey there , Can you eloborate on this a bit , I want to work on this ,but as a newbie I am a bit confused that how should I begin with that.

@maedoc
Copy link
Member Author

maedoc commented Jan 8, 2024

The dfun method linked to in the issue is a bottleneck for simulations using this model. This issue would involve writing a new implementation with Numba. This can be approached by writing a benchmark of the current code, creating a second implementation, checking the second implementation produces identical results as the first, and finally checking that the second implementation is faster.

@peeplika
Copy link

Thanks for the detailed explanation. I’ll start working on this issue using the information you’ve provided. I’ve observed Numba implementations in other models and I think they can be used as references for this task.

@peeplika
Copy link

Hello,
I've tried re-implementing the dfun functions, but unfortunately, the results are not identical to the previous implementation. I've attached a PR for your review. Could you please take a look and provide any feedback ?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/scilib enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants