-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conflicting dwarf version errors #13
Comments
I retried the code and got an error indeed, though seemingly different to yours. However, when put inside a function, it seems to work: using CUDA
import AcceleratedKernels as AK
function addfunc()
x = CuArray(reshape(1:3000, 3, 1000))
y = similar(x)
AK.foraxes(x, 2) do i
for j in axes(x, 1)
@inbounds y[j, i] = 2 * x[j, i] + 1
end
end
y
end
addfunc() Would that work on your end? If not, it may be a CUDA configuration error - would you be able to run some higher-level, pure-CUDA.jl code, like: using CUDA
x = CuArray(1:1000)
y = CuArray(1:1000)
z = x + y |
@anicusan When I place it in a function like you have, it works, and I know my CUDA config is correct, since I use elsewhere in other settings. In practice, all my code will be in functions anyways. I'm curious as to why it throws all these errors when not in a function. I've been toying with the idea of using AK, since it looks like a nice concise way to avoid kernel boilerplate code. |
I was finally able to look closer into this - what happens is the lambda (inside the This only seems to be a problem for const x = MtlArray(reshape(1:3000, 3, 1000))
AK.reduce(x, init=0) do a, b
a + b # self-contained, does not reference outside variables
end In terms of future stability, lambda capture inside functions is too pervasive in both base Julia and JuliaGPU codes for it to not work inside functions, so I am expecting it to be fine when written as such. I will update the docs and README to avoid global variables, even when used with |
Ok, thanks for looking into this! |
When I try to run some of the examples in the documentation (https://juliagpu.github.io/AcceleratedKernels.jl/stable/api/foreachindex/), I get dwarf version errors. For instance, when I run:
I get this (and a bunch more LLVM errors)
and more like
Here's my system info
The text was updated successfully, but these errors were encountered: