FluxML / FluxML/NNlib.jl

Better errors for un-implemented functions

Open
#427 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Julia
Stars
258
Forks
138
Avg merge
2d 1h
Merged PRs (30d)
3

Description

Functions like gather/scatter give scalar indexing errors if used on CuArrays without remembering to load NNlibCUDA.

Since there is now a very lightweight GPUArraysCore, I think NNlib should depend on that, and define dumb methods on `::AbstractGPUArray` which throw a helpful error.

Edit, 2023:

After https://github.com/FluxML/NNlib.jl/pull/492 we use extensions. If I understand right it may still be possible to forget to load cuDNN.

Some kernels don't yet work for Metal / AMDGPU, e.g. https://github.com/FluxML/Flux.jl/issues/2278 . Here too it would be nicer to get a clear "not implemented" error.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the gather/scatter methods and the extension setup introduced by PR 492, then compare behavior when cuDNN, NNlibCUDA, Metal, or AMDGPU support is not loaded. The work is done when unsupported GPU operations produce clear not-implemented errors instead of scalar indexing errors across the affected backends.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.