JuliaDiff / JuliaDiff/FiniteDiff.jl
Feature request: vectorized finite difference evaluation
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 304
- Forks
- 42
- Avg merge
- 24m
- Merged PRs (30d)
- 2
Description
I have an implicit function that is extremely expensive to evaluate. However, it is fully GPU parallelized, in that if a matrix is provided, then each row is evaluated in parallel. For this particular function, the output is a matrix of size = (something, number of rows)
Doing finite differences through this is then easily parallelizable by making each row be a finite difference "tangent" (sorry if I'm misusing that word), so that the full Jacobian can be constructed in one single function evaluation as opposed to many evaluations.
I am doing this now manually, but it would be nice if this functionality could be generalized into FiniteDiff. perhaps a dims argument could be provided to AutoFiniteDiff specifying the dimension about which the evaluation is vectorized (in my case across the rows, so dims=1).
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 reading the existing FiniteDiff and AutoFiniteDiff APIs and the issue's manually vectorized GPU use case. Determine how a dims argument would represent row-wise finite-difference tangents and how the output shape should map to the Jacobian. Done means a generalized API can perform the vectorized evaluation in one function call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100