Skip to content
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

InvalidIRError when putting a model on the GPU #1754

Closed
SimonCoste opened this issue Oct 19, 2021 · 1 comment
Closed

InvalidIRError when putting a model on the GPU #1754

SimonCoste opened this issue Oct 19, 2021 · 1 comment

Comments

@SimonCoste
Copy link

Hi, I successfully used Flux.jl on a remote machine with GPUs, but a bug suddenly appeared out of nowhere - something might have been modified on the machine.

The bug happens when I want to put a model on the gpu.
The minimal working example is as follows:

julia
using Flux, CUDA
C = Conv((3,3), 1=>1)
C = C |> gpu

results in the following error : 

ERROR: InvalidIRError: compiling kernel partial_mapreduce_grid(typeof(identity), typeof(|), Bool, CartesianIndices{4, NTuple{4, Base.OneTo{Int64}}}, CartesianIndices{4, NTuple{4, Base.OneTo{Int64}}}, Val{true}, CuDeviceArray{Bool, 5, 1}, Base.Broadcast.Broadcasted{CUDA.CuArrayStyle{4}, NTuple{4, Base.OneTo{Int64}}, Base.var"#76#77"{typeof(iszero)}, Tuple{CuDeviceArray{Float32, 4, 1}}}) resulted in invalid LLVM IR
Reason: unsupported call to an unknown function (call to julia.gpu.state_getter)

The gpu is here and available, ie has_cuda() is true, and

x = randn(10)
x = x |> gpu

works as intended.

Could you help me debug this ? 

@DhairyaLGandhi
Copy link
Member

DhairyaLGandhi commented Oct 19, 2021

Hi, this seems like an issue of the setup rather than with Flux. I might point you to the JuliaLang Slack https://julialang.org/slack/ or discourse where this would be more appropriate.

As a debugging step does suppressing the output for the layer work in the REPL?

What is the output when you try to do

julia> c = c |> gpu; #notice the ; which would suppress the output

I'm going to close the issue, but in case it turns out there's anything to be fixed in Flux, I'd be happy to reopen and see this sorted.

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

No branches or pull requests

2 participants