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

Callable tridiagonal coefficients produces catastrophic loss of performance #3047

Closed
glwagner opened this issue Apr 3, 2023 · 2 comments · Fixed by #3122
Closed

Callable tridiagonal coefficients produces catastrophic loss of performance #3047

glwagner opened this issue Apr 3, 2023 · 2 comments · Fixed by #3122
Labels
performance 🏍️ So we can get the wrong answer even faster

Comments

@glwagner
Copy link
Member

glwagner commented Apr 3, 2023

Currently BatchedTridiagonalSolver supports Callable tridiagonal coefficients via

@inline get_coefficient(a::Base.Callable, i, j, k, grid, p, args...) = a(i, j, k, grid, p, args...)
@inline get_coefficient(a::Base.Callable, i, j, k, grid, ::Nothing, args...) = a(i, j, k, grid, args...)

However, as noted on #3030 this can produce a catastrophic loss of performance. Therefore, this support should be discontinued.

cc @simone-silvestri

@glwagner glwagner added the performance 🏍️ So we can get the wrong answer even faster label Apr 3, 2023
@navidcy
Copy link
Collaborator

navidcy commented Apr 4, 2023

Any idea if this affects GPU or CPU or both?

@glwagner
Copy link
Member Author

glwagner commented Apr 4, 2023

It would seem just CPU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance 🏍️ So we can get the wrong answer even faster
Projects
None yet
2 participants