-
Notifications
You must be signed in to change notification settings - Fork 40
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
sqrt(::Complex) unsupported due to conversion exceptions #364
Comments
Dup of #69. You need to avoid exceptions in your code. |
@maleadt to clarify a bit, is the issue that Would something actionable here be to add a |
Yeah, in fact, exceptions aren't allowed at all, not only in broadcasting code. julia> function f(x)
@inbounds x[1] = sqrt(x[1])
return
end
f (generic function with 1 method)
julia> @metal f(mtl([1f0+1f0im]))
ERROR: InvalidIRError: compiling MethodInstance for f(::MtlDeviceVector{ComplexF32, 1}) resulted in invalid LLVM IR
Reason: unsupported call to an unknown function (call to gpu_malloc)
If you inspect the generated LLVM IR you can spot the calls to
Sure, that, or a quirk for |
Hello,
I am trying to compute the square root of a matrix with values of
ComplexF32
and I run into a internalMetal.jl
error. Here is a small exampleThis is the error I am seeing
And this is my version info
Thanks!
The text was updated successfully, but these errors were encountered: