We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apparently this doesn't result in the expected speed-ups. Unsure why: JuliaGPU/GPUArrays.jl#454 (comment)
Simply providing the cartesian index statically like so is sufficient, at least with Metal's back-end compiler:
struct StaticCartesianIndices{N, I} end StaticCartesianIndices(iter::CartesianIndices{N}) where {N} = StaticCartesianIndices{N, iter.indices}() StaticCartesianIndices(x) = StaticCartesianIndices(CartesianIndices(x)) Base.CartesianIndices(iter::StaticCartesianIndices{N, I}) where {N, I} = CartesianIndices{N, typeof(I)}(I) Base.@propagate_inbounds Base.getindex(I::StaticCartesianIndices, i::Int) = CartesianIndices(I)[i] Base.length(I::StaticCartesianIndices) = length(CartesianIndices(I)) function Base.show(io::IO, I::StaticCartesianIndices) print(io, "Static") show(io, CartesianIndices(I)) end
Only relying on LLVM isn't sufficient, see JuliaGPU/GPUArrays.jl#454 (comment) and JuliaGPU/GPUArrays.jl#454 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Apparently this doesn't result in the expected speed-ups. Unsure why: JuliaGPU/GPUArrays.jl#454 (comment)
Simply providing the cartesian index statically like so is sufficient, at least with Metal's back-end compiler:
Only relying on LLVM isn't sufficient, see JuliaGPU/GPUArrays.jl#454 (comment) and JuliaGPU/GPUArrays.jl#454 (comment)
The text was updated successfully, but these errors were encountered: