Skip to content

Add GNNGraphsEnzymeCoreExt marking scaled_laplacian inactive for Enzyme - #706

Merged
CarloLucibello merged 1 commit into
JuliaGraphs:masterfrom
Parvm1102:enzyme-scaled-laplacian
Aug 26, 2026
Merged

CarloLucibello merged 1 commit into
JuliaGraphs:masterfrom
Parvm1102:enzyme-scaled-laplacian

Conversation

@Parvm1102

Copy link
Copy Markdown
Contributor

scaled_laplacian is already @non_differentiable for ChainRules, but Enzyme does not
read those declarations, so it differentiated the Krylov eigensolve inside it and failed
with an IllegalTypeAnalysisException in SparseArrays. The Laplacian depends only on the
graph, never on the node features, so treating it as constant loses no gradient.

This adds a small EnzymeCore package extension (same pattern as the Mooncake extension)
with a single EnzymeRules.inactive declaration, plus a test.

Unblocks ChebConv, GConvGRUCell and GConvLSTMCell under Enzyme; GConvGRU/GConvLSTM
additionally need a separate GNNRecurrence fix.

Signed-off-by: Parvm1102 <parvmittal31757@gmail.com>
@Parvm1102

Copy link
Copy Markdown
Contributor Author

Please review this @CarloLucibello

@CarloLucibello
CarloLucibello merged commit ec7f620 into JuliaGraphs:master Aug 26, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants