Skip to content

Switch to the LLVM SPIR-V back-end. #285

New issue

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

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Feb 13, 2025

Same as JuliaGPU/oneAPI.jl#491, but I figured it's easier to do the experimentation here as the SPIRVIntrinsics submodule is part of this repository.

@maleadt
Copy link
Member Author

maleadt commented Feb 18, 2025

Currently blocked on pocl/pocl#1799.

MWE:

function double_print_kernel()
    OpenCL.@print "foo"
    OpenCL.@print "barbar"
    return
end

function main()
    @opencl double_print_kernel()
end

Reduced from:

function orig()
    x = CLArray(zeros(Float32, (1, 1)))
    y = CLArray(rand(Float32, (1)))
    x[:, 1] = y
end

EDIT: upstream argued that this is an LLVM bug.

@maleadt
Copy link
Member Author

maleadt commented Feb 20, 2025

Also blocked on llvm/llvm-project#127977

MWE: CLArray{Float32}(undef, 5, 5) + 1f0 * I

Reduced from:

function orig()
    T1 = T2 = Float32
    AT = CLArray
    f = identity
    x = ones(T1, 5, 5)
    y = AT(x)

    xw = f(x)
    yw = f(y)

    J = one(T2) * I

    @allowscalar collect(xw + J)  collect(yw + J)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant