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

gpu should warn if cuDNN is not installed #2440

Open
CarloLucibello opened this issue May 8, 2024 · 2 comments
Open

gpu should warn if cuDNN is not installed #2440

CarloLucibello opened this issue May 8, 2024 · 2 comments
Labels

Comments

@CarloLucibello
Copy link
Member

Emerged in https://discourse.julialang.org/t/scalar-indexing-gpu-problem-in-flux-jl-model/113974

In the following example one gets an error but no warnings:

using CUDA
using Flux
using Random
CUDA.allowscalar(false)
N_data = 32
img_dims = (16, 16, 3)
images = Float32.(randn((img_dims..., N_data))) |> gpu

model = Chain(
    Conv((3,3), 3 => 1, relu),      # 16×16×3 -> 14×14×1
    Flux.flatten,                   # 14×14×1 -> 196
    Dense(196 => 2)                 # 196 -> 2
)  |> gpu

model(images) # error: TaskFailedException: "Scalar indexing is disallowed."

The problem is that cuDNN is not installed so the convolution falls back to the cpu method.

@ToucheSir
Copy link
Member

I think this is a dupe of FluxML/NNlib.jl#523?

@CarloLucibello
Copy link
Member Author

We shouldn't wait for the conv to happen, when gpu is called we should warn already.

@mcabbott mcabbott added the cuda label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants