JuliaDiff / JuliaDiff/ForwardDiff.jl
tagging API?
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 1k
- Forks
- 160
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
On #807, one option that i did not see considered is the posibility of defining an available (if experimental) tagging API, with ForwardDiff.Tag as it's only available implementation in ForwardDiff, via an AbstractTag{F,V} supertype.
For example, one package implementing StaticTag{F,V} <: AbstractTag{F,V} (in particular, https://github.com/JuliaDiff/ForwardDiff.jl/pull/807#issuecomment-4472479160 without the fallback) could define their own static comparison mechanism, without compromising the current runtime capabilities that ForwardDiff already gives with their own Tag implementation, and erroring when there there is any ambiguity (closures of duals) instead of recurring to checking a global value.
Another example was an attempt done in #748. While the discussion on that PR was long and the PR was finally reverted, that PR inadvertly required following a currently private tagging API:
checktag≺- replacing most hardcoded Tag constructors by an overloadable
maketagmethod
While i agree that the current Tag mechanism is adequate for most automatic differentiation workloads, new use cases, like completely compiled evaluations, merit thinking about the current invariants baked in the package, in my opinion. In this context, the implementation of a tagging API just shifts the burden from the ForwardDiff developer to the developer of the tagging mechanism.
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
Start by reviewing issues #807 and #748, then inspect the existing ForwardDiff.Tag implementation and the mentioned checktag, ≺, and maketag entry points. The issue proposes an experimental AbstractTag{F,V} API, but does not define a concrete interface or acceptance criteria; done would require agreement on the public design and its invariants.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100