Skip to content

Compatibility with CUDA.jl #58

@weiyuanlou

Description

@weiyuanlou

Dear QuadGK developers:
I'm attempting to calculate multiple 1D integrals in parallel using GPU via CUDA.jl. However currently QuadGK does not seem to be GPU-compatible (with CUDA.jl). A simple example below generates errors ( see the attached text file ). Is it possible, perhaps for the 1D integrals with limited options, to become compatible with CUDA.jl? Thanks.

using CUDA
using QuadGK

Z = Array([z for z in 1:1:4]);
Zcu = CuArray([z for z in 1:1:4]);

function f_int(z_ob) 

    iii(z) =  z_ob - z  
    
    return quadgk(z -> iii(z), 0, 1, rtol=1e-4)[1]
    
end

f_int.(Z)  # This works 

f_int.(Zcu) # This does not work

QUADgk error with CUDA.txt

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