Skip to content

oneAPI with nested integrals #397

Description

@foglienimatteo

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)

Activity

  1. maleadt commented on Mar 16, 2024

    @maleadt
    Member

    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.

  2. locked and limited conversation to collaborators on Mar 16, 2024
  3. converted this issue into a discussion #398 on Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions