Skip to content

Add GNNGraphsEnzymeCoreExt marking scaled_laplacian inactive for Enzyme - #706

Open
Parvm1102 wants to merge 1 commit into
JuliaGraphs:masterfrom
Parvm1102:enzyme-scaled-laplacian
Open

Add GNNGraphsEnzymeCoreExt marking scaled_laplacian inactive for Enzyme#706
Parvm1102 wants to merge 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

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.

1 participant