Skip to content

Automatically generate pullbacks of non-linear constructors - #1286

Merged
PetroZarytskyi merged 3 commits into
vgvassilev:masterfrom
PetroZarytskyi:constr-diff
Jun 18, 2025
Merged

Automatically generate pullbacks of non-linear constructors#1286
PetroZarytskyi merged 3 commits into
vgvassilev:masterfrom
PetroZarytskyi:constr-diff

Conversation

@PetroZarytskyi

@PetroZarytskyi PetroZarytskyi commented Mar 18, 2025

Copy link
Copy Markdown
Collaborator

This PR introduces automatically generating any constructor pullbacks when custom ones are not provided. This is the continuation of #1288, which only enabled automatic pullbacks of simple linear constructors.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread include/clad/Differentiator/ReverseModeVisitor.h
Comment thread include/clad/Differentiator/STLBuiltins.h Outdated
Comment thread include/clad/Differentiator/STLBuiltins.h Outdated
Comment thread include/clad/Differentiator/STLBuiltins.h Outdated
Comment thread include/clad/Differentiator/STLBuiltins.h Outdated
Comment thread include/clad/Differentiator/STLBuiltins.h Outdated
Comment thread lib/Differentiator/CladUtils.cpp Outdated
Comment thread lib/Differentiator/CladUtils.cpp Outdated
@PetroZarytskyi
PetroZarytskyi force-pushed the constr-diff branch 2 times, most recently from 4c6043e to be84924 Compare March 18, 2025 10:00
Comment thread test/Gradient/UserDefinedTypes.C Outdated
Comment thread test/Gradient/UserDefinedTypes.C Outdated
@PetroZarytskyi
PetroZarytskyi marked this pull request as ready for review April 3, 2025 08:23
@PetroZarytskyi
PetroZarytskyi force-pushed the constr-diff branch 3 times, most recently from 47f54c5 to 37d2d2c Compare April 3, 2025 13:08
@PetroZarytskyi

Copy link
Copy Markdown
Collaborator Author

The commits about try stmts and lambdas fix crashes that arise from unsupported features. We attempt to differentiate them because we now differentiate all constructors, including the ones added in #1288 just to make sure they aren't differentiated.

@codecov

codecov Bot commented Apr 3, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@PetroZarytskyi
PetroZarytskyi force-pushed the constr-diff branch 2 times, most recently from be24b01 to 0b9d263 Compare June 16, 2025 13:02

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread include/clad/Differentiator/STLBuiltins.h Outdated
Comment thread include/clad/Differentiator/STLBuiltins.h Outdated
Comment thread include/clad/Differentiator/STLBuiltins.h Outdated
Comment thread include/clad/Differentiator/STLBuiltins.h Outdated
Comment thread include/clad/Differentiator/STLBuiltins.h Outdated
Comment thread lib/Differentiator/ReverseModeVisitor.cpp
@PetroZarytskyi
PetroZarytskyi force-pushed the constr-diff branch 2 times, most recently from aa51eba to e96b094 Compare June 16, 2025 13:38
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@vgvassilev vgvassilev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM. If that's the commit structure you'd like to keep go ahead and merge; otherwise fix it and merge.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread include/clad/Differentiator/KokkosBuiltins.h
@PetroZarytskyi
PetroZarytskyi force-pushed the constr-diff branch 3 times, most recently from 50c43ad to 6aef646 Compare June 17, 2025 17:32

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread include/clad/Differentiator/KokkosBuiltins.h
@PetroZarytskyi
PetroZarytskyi force-pushed the constr-diff branch 3 times, most recently from 370c0b3 to 92ff102 Compare June 17, 2025 21:07
This commit introduces automatically generating any constructor pullbacks when custom ones are not provided. This is the continuation of vgvassilev#1288, which only enabled automatic pullbacks of simple linear constructors.
@PetroZarytskyi PetroZarytskyi changed the title Automatically generate constructor pullbacks Automatically generate pullbacks of non-linear constructors Jun 17, 2025
@PetroZarytskyi
PetroZarytskyi merged commit f87ba7e into vgvassilev:master Jun 18, 2025
88 checks passed
@PetroZarytskyi
PetroZarytskyi deleted the constr-diff branch June 18, 2025 10:32
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.

3 participants