You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionkernel(state)
idx =thread_position_in_grid_1d()
state[idx] =rand(Float32)
returnend
n =10
state = Metal.ones(n)
@metal threads=n kernel(state)
which currently fails with
julia> @metal threads=n kernel(state)
ERROR: InvalidIRError: compiling MethodInstance for kernel(::MtlDeviceVector{Float32, 1}) resulted in invalid LLVM IR
Reason: unsupported call to an unknown function (call to julia.get_pgcstack)
Yes, although ideally it should be implemented in GPUArrays.jl now that it's based on KernelAbstractions.jl. This may require some improvements to KA.jl though.
For use with https://github.com/SciML/PSOGPU.jl, it would be great to have basic support of on-device rand(). A simple MWE, adapted from #406, would be
which currently fails with
Would a solution such as in https://github.com/JuliaGPU/CUDA.jl/blob/master/src/device/random.jl be appropriate? What would be the most appropriate way to store the state in Metal?
The text was updated successfully, but these errors were encountered: