Skip to content

Fix Enzyme sparse_store dispatch and drop the unused primal buffer - #629

Merged
nkoukpaizan merged 1 commit into
developfrom
nicholson/remove-elementary-v
Oct 23, 2026
Merged

nkoukpaizan merged 1 commit into
developfrom
nicholson/remove-elementary-v

Conversation

@nkoukpaizan

Copy link
Copy Markdown
Collaborator

Description

This fixes a latent bugs in the Enzyme sparse_store dispatch and drop the unused primal buffer.

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • [N/A] The new code follows GridKit™ style guidelines.
  • [N/A] There are unit tests for the new code.
  • [N/A] The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • [N/A] The CHANGELOG.md has been updated to reflect the changes. If this is a minor PR that is part of a larger fix already included in the file, state so.

Further comments

@nkoukpaizan nkoukpaizan self-assigned this Oct 22, 2026
@nkoukpaizan nkoukpaizan added bug Something isn't working cleanup labels Oct 22, 2026
@nkoukpaizan
nkoukpaizan marked this pull request as ready for review October 22, 2026 20:18
@nkoukpaizan
nkoukpaizan requested a review from lukelowry October 22, 2026 20:18

@lukelowry lukelowry left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you for making this more robust. I can build this on my system and all tests pass

I am not sure if this is in scope, but I found one type issue that fails if I instantiate with float

  GridKit::Testing::TestingResults              result;
  GridKit::Testing::EnzymeTests<double, size_t> test;
  GridKit::Testing::EnzymeTests<float, size_t>  test_float;

  result += test.scalarFunction();
  result += test.vectorFunctionSparse();
  result += test_float.vectorFunctionSparse();

I think everything is double, so unsure if this is an actual issue

@nkoukpaizan

Copy link
Copy Markdown
Collaborator Author
  GridKit::Testing::TestingResults              result;
  GridKit::Testing::EnzymeTests<float, size_t>  test_float;

  result += test.scalarFunction();
  result += test_float.vectorFunctionSparse();

I think everything is double, so unsure if this is an actual issue

Right, that doesn't work now because we have yet to add template instantiations for the models on float.

@nkoukpaizan
nkoukpaizan merged commit 642d370 into develop Oct 23, 2026
7 checks passed
@nkoukpaizan
nkoukpaizan deleted the nicholson/remove-elementary-v branch October 27, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants