Skip to content

Rationals behave badly #118

@dpsanders

Description

@dpsanders

Rationals do not behave well inside CuArrays.
Not sure there's much to do about this, except implement a simpler Rational type:

julia> v = CuArray([1//3])
1-element CuArray{Rational{Int64},1}:
 1//3

julia> v .+ v
ERROR: InvalidIRError: compiling JuliaGPU/CuArrays.jl#23(CuArrays.CuKernelState, CUDAnative.CuDeviceArray{Rational{Int64},1,CUDAnative.AS.Global}, Base.Broadcast.Broadcasted{Nothing,Tuple{Base.OneTo{Int64}},typeof(+),Tuple{Base.Broadcast.Extruded{CUDAnative.CuDeviceArray{Rational{Int64},1,CUDAnative.AS.Global},Tuple{Bool},Tuple{Int64}},Base.Broadcast.Extruded{CUDAnative.CuDeviceArray{Rational{Int64},1,CUDAnative.AS.Global},Tuple{Bool},Tuple{Int64}}}}) resulted in invalid LLVM IR
Reason: unsupported call to the Julia runtime (call to jl_f__apply_latest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcuda arrayStuff about CuArray.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions