-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Related to SciML/ADTypes.jl#127 (comment), would it be possible to add a page about sparsity detection / exploitation to the Reactant docs? It gets mentioned regularly but I'm not sure where to start. For instance, what would be the equivalent of the following workflow with Reactant? How do I get a sparse matrix as the output, and what type does it have?
using ForwardDiff
using DifferentiationInterface
using SparseConnectivityTracer, SparseMatrixColorings
f(x) = map(sin, x) + map(cos, reverse(x))
backend = AutoSparse(
AutoForwardDiff();
sparsity_detector = TracerSparsityDetector(),
coloring_algorithm = GreedyColoringAlgorithm()
);
x = rand(10)
prep = prepare_jacobian(f, backend, x);
jacobian(f, prep, backend, x)Metadata
Metadata
Assignees
Labels
No labels