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

More efficient eval_f in RBC on GPU #492

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

brownbaerchen
Copy link
Contributor

After profiling the code on GPUs some more, I noticed some efficiency can be gained from reducing the number of matrix multiplications. That is all that I am doing here: Rather than computing derivatives by multiplying each component with the derivative matrix separately, I construct a large matrix containing the derivative matrix multiple times in order to compute all derivatives simultaneously. Also, I cache the $L$ matrix in the basis of Chebychov T polynomials, rather than computing it every time. This is not a huge difference, but saves a few ms in every call of the function on both CPU and GPU.

@pancetta
Copy link
Member

Please merge master again

@pancetta pancetta merged commit 85dc966 into Parallel-in-Time:master Oct 8, 2024
86 checks passed
@brownbaerchen brownbaerchen deleted the RBC_efficiency branch October 8, 2024 16:01
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.

2 participants