Add `@non_differentiable` rules for basic random functions
Open
Nobody has claimed this yet.
enhancement
good first issue
- Dominant language
- Julia
- Stars
- 1.4k
- Forks
- 281
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 30
Description
I need to have these lines in my codes to make AD works.
@non_differentiable CUDA.zeros(::Any...)
@non_differentiable CUDA.rand(::Any...)
@non_differentiable CUDA.randn(::Any...)
Can we add them to the extension? Adapting from
https://github.com/JuliaDiff/ChainRules.jl/blob/main/src/rulesets/Random/random.jl
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the CUDA.jl extension and compare the requested rules with ChainRules.jl's src/rulesets/Random/random.jl. Confirm how @non_differentiable is used for CUDA.zeros, CUDA.rand, and CUDA.randn, then verify that automatic differentiation no longer requires users to define these rules manually.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100