JuliaDiff / JuliaDiff/ChainRules.jl

Returning `Broadcasted` cotangents for `Broadcasted` arguments?

Open
#698 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
475
Forks
98
PR merge metrics
No merged PRs in 30d

Description

More of a question on whether this makes sense than a feature request. I could see it replacing or complementing @thunk(<eager broadcast> of unbroadcast(...)) for rules such as https://github.com/JuliaDiff/ChainRules.jl/blob/v1.48.0/src/rulesets/Base/broadcast.jl#L174.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review src/rulesets/Base/broadcast.jl around line 174 and compare the proposed Broadcasted cotangent behavior with the existing thunk/unbroadcast approach. Done means reaching and recording a decision on whether this API change should be pursued, since the issue currently asks a design question rather than specifying an implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.