Skip to content

malloc and exceptions #65

Open
Open
@maleadt

Description

@maleadt

Those are the two remaining bits that will unlock a lot of functionality:

julia> exp.(oneArray(rand(ComplexF32, 2)))
ERROR: InvalidIRError: compiling kernel broadcast_kernel(oneAPI.oneKernelContext, oneDeviceVector{ComplexF32, 1}, Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(exp), Tuple{Base.Broadcast.Extruded{oneDeviceVector{ComplexF32, 1}, Tuple{Bool}, Tuple{Int64}}}}, Int64) resulted in invalid LLVM IR
Reason: unsupported call to an unknown function (call to gpu_malloc)
Stacktrace:
  [1] malloc
    @ ~/Julia/pkg/GPUCompiler/src/runtime.jl:88
  [2] macro expansion
    @ ~/Julia/pkg/GPUCompiler/src/runtime.jl:185
  [3] box
    @ ~/Julia/pkg/GPUCompiler/src/runtime.jl:174
  [4] box_float32
    @ ~/Julia/pkg/GPUCompiler/src/runtime.jl:214
  [5] sincos_domain_error
    @ special/trig.jl:164
  [6] sincos
    @ special/trig.jl:181
  [7] exp
    @ complex.jl:655
  [8] _broadcast_getindex_evalf
    @ broadcast.jl:648
  [9] _broadcast_getindex
    @ broadcast.jl:621
 [10] getindex
    @ broadcast.jl:575
 [11] broadcast_kernel
    @ ~/Julia/depot/packages/GPUArrays/WV76E/src/host/broadcast.jl:62

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestkernelsThings about kernels and how they are compiled.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions