refactor: Make detray reuse ACTS' codegen facilities#5597
Draft
paulgessinger wants to merge 5 commits into
Draft
refactor: Make detray reuse ACTS' codegen facilities#5597paulgessinger wants to merge 5 commits into
paulgessinger wants to merge 5 commits into
Conversation
Introduce element-access strategies (flat_index for ACTS, getter_element for detray) so the one genuine point of divergence between the ACTS and detray sympy backends is injectable. Default stays flat-index, leaving the three ACTS generators' output byte-for-byte unchanged (verified). Also add the MyCXXCodePrinterWithoutKnownAssignment variant detray needs. Bump the codegen package to 0.3.0. Groundwork for unifying detray's codegen onto this shared core. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a detray emission backend (codegen.detray_backend: getter::element dialect, DETRAY_HOST_DEVICE/concept signatures, sparsity asserts) to the shared ACTS codegen package, and repoint detray's generators at it. Delete detray_sympy's common.py/codegen.py, which were a byte-for-byte fork of the ACTS core; detray_sympy now keeps only its domain modules (matrices, checks, output). generate_all.sh runs the generators via uv against the in-tree shared package. Output of all four generated headers is byte-for-byte unchanged (verified); detray codegen pytest suite still passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Converge detray onto ACTS's build-time codegen model: the four propagator codegen headers are now generated into the build tree by the shared ACTS codegen package via acts_code_generation(), instead of being committed. - Make acts_code_generation() INTERFACE-aware: header-only targets (detray:: core) get the generated include dir on their INTERFACE; compiled targets keep PRIVATE as before. Add an optional RESULT_INCLUDE_DIR out-param used to install the generated headers. - Wire generation in Detray/core/CMakeLists.txt by reusing the in-tree ACTS infra via relative path (../../cmake, ../../codegen) — no published package. - Change the four `#include "./codegen/..."` to full-path includes so they resolve against the build-tree include dir, and delete the committed headers. Verified: configure succeeds; all four detray headers (and the three ACTS headers) generate byte-for-byte identically to the previous output; a consumer TU (ActsExamplesDetray DetrayPropagator.hpp) compiles against them; and the codegen step is correctly ordered before consumers compile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2c008fd to
66454f0
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.