JuliaGPU/XLA.jl

Running an XRT computation with 0 arguments does not work

ViralBShah opened this issue · 1 comments


julia> f() = XLA.HloRng(Float32, (5,5), 1)(XRTArray(0f0),XRTArray(1f0))
f (generic function with 1 method)

julia> @tpu_compile f()
XLA.XRTCompilation(Session(Ptr{Nothing} @0x00007f87b0290e50), nothing, XLA.xla.ProgramShape(XLA.xla.Shape[], XLA.xla.Shape(11, [5, 5], #undef, XLA.xla.Layout(1, [0, 1], #undef, 0, 0)), #undef), XRTArray{Float32,(5, 5),2}, 2205288722480676172)

julia> run(ans)
ERROR: MethodError: run(::XLA.XRTCompilation) is ambiguous. Candidates:
  run(::XLA.XRTCompilation, xrt::Union{Complex{Float32}, Bool, Float16, Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8, XRTArray}...) in XLA at /home/viralbshah/XLAHacks.jl/src/execute.jl:45
  run(::XLA.XRTCompilation, com::XRTAllocation...) in XLA at /home/viralbshah/XLAHacks.jl/src/xrt.jl:77
Possible fix, define
  run(::XLA.XRTCompilation)
Stacktrace:
 [1] top-level scope at none:0
Keno commented

This is fixed.