Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

oneAPI with nested integrals #397

Closed
foglienimatteo opened this issue Mar 16, 2024 · 1 comment
Closed

oneAPI with nested integrals #397

foglienimatteo opened this issue Mar 16, 2024 · 1 comment

Comments

@foglienimatteo
Copy link

We are working on the open-source Julia code GaPSE.jl, and there we have to perform for some evaluations three nested integrals:

lensing

where cosmo is a Julia Struct that contains relevant data (Dierckx.Spline1D and Float64 mostly) needed for the computation of f.

Our idea was to create a 2D kernel for computing the integrand function f (defined here) over the two inner integrals (performed here), and pass as parameter the cosmo Struct. However, it seems that the 2D kernel has not been implemented, and there isn't a oneStruct wrapper for this kind of task. We can use something like oneArray([cosmo]) but it seems more like a workaround than a solution.

What is the standard procedure to use oneAPI.jl for this scenario, where an integrand function must be evaluated over a (2d) vector with input struct and parameters?

(In line of principle, working with oneAPI splines could solve this particular problem, but they are not implemented as far as we understood)

@maleadt
Copy link
Member

maleadt commented Mar 16, 2024

There is no standard procedure to compute an integral using Julia's GPU packages, i.e., there is no pre-existing parallel abstraction do to so. You will have to write your own kernel, at which point you have to think about how to best apply the device's parallelism to your computational problem. I'm not familiar with parallelizing the calculation of a (nested) integral, so I'd look around for GPU resources for doing so. These don't need to be Julia or oneAPI specific, as at the kernel programming level you're working at the same abstraction level of the vendor toolkits anyway.

I did find this on the Julia Discourse though, https://discourse.julialang.org/t/julia-integral-calculation-community-module-or-own-module/24278, which seems relevant.

However, it seems that the 2D kernel has not been implemented, and there isn't a oneStruct wrapper for this kind of task.

It is not clear what you are referring to here. What 2D kernel are you expecting to be implemented? What would oneStruct do? Please be more specific about questions, assuming domain knowledge makes it hard to actually help.

I'll also convert this to a discussion, as this is not an bug. Please use Discourse in the future, where other people familiar with (GPU programming in) Julia, or domain experts, can chime in.

@JuliaGPU JuliaGPU locked and limited conversation to collaborators Mar 16, 2024
@maleadt maleadt converted this issue into discussion #398 Mar 16, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants