Skip to content

fix(qudarap): exclude fake_propagate CUDA path from PRODUCTION builds#255

Merged
plexoos merged 2 commits intomainfrom
fix-slow-cicc-cuda12.5
Mar 29, 2026
Merged

fix(qudarap): exclude fake_propagate CUDA path from PRODUCTION builds#255
plexoos merged 2 commits intomainfrom
fix-slow-cicc-cuda12.5

Conversation

@plexoos
Copy link
Copy Markdown
Member

@plexoos plexoos commented Mar 28, 2026

Guard the test-only _QSim_fake_propagate launcher and its host entry
point with !defined(PRODUCTION).

In PRODUCTION builds, make QSim::fake_propagate fail fast on the host
side instead of compiling the CUDA path.

This avoids the CUDA 12.5.x cicc compile-time blow-up in QSim.cu
Release builds while leaving the normal runtime propagation code
unchanged and preserving fake-propagate behavior in non-PRODUCTION
builds.

Verified with:

  • direct Release nvcc compile of QSim.cu
  • cmake --build /opt/eic-opticks/build --parallel --target install

An actual fix for #57

Copilot AI review requested due to automatic review settings March 28, 2026 00:42
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Cpp-linter Review

Used clang-format v20.1.2

Click here for the full clang-format patch
diff --git a/qudarap/QSim.cc b/qudarap/QSim.cc
index 458db50..bf8f771 100644
--- a/qudarap/QSim.cc
+++ b/qudarap/QSim.cc
@@ -1522,2 +1521,0 @@ quad2* QSim::UploadFakePRD(const NP* ip, const NP* prd) // static
-
-
@@ -1551,3 +1549,3 @@ void QSim::fake_propagate( const NP* prd, unsigned type )
-    (void)prd ;
-    (void)type ;
-    LOG(fatal) << "QSim::fake_propagate is disabled in PRODUCTION builds" ;
+    (void)prd;
+    (void)type;
+    LOG(fatal) << "QSim::fake_propagate is disabled in PRODUCTION builds";

Have any feedback or feature suggestions? Share it here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR prevents the test-only CUDA “fake propagate” launcher path from being compiled in PRODUCTION builds, avoiding a CUDA 12.5.x cicc compile-time failure while keeping normal propagation unchanged.

Changes:

  • Wrap _QSim_fake_propagate kernel and QSim_fake_propagate_launch in QSim.cu with #if !defined(PRODUCTION).
  • Guard the host-side launcher declaration and make QSim::fake_propagate fail fast in PRODUCTION builds.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
qudarap/QSim.cu Excludes the fake-propagate CUDA kernel/launcher from PRODUCTION compilation units.
qudarap/QSim.cc Removes the host dependency on the fake-propagate launcher in PRODUCTION and hard-disables the API at runtime.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot dismissed their stale review March 28, 2026 00:45

outdated suggestion

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Cpp-linter Review

Used clang-format v20.1.2

Click here for the full clang-format patch
diff --git a/qudarap/QSim.cc b/qudarap/QSim.cc
index aac450e..bf8f771 100644
--- a/qudarap/QSim.cc
+++ b/qudarap/QSim.cc
@@ -1522,2 +1521,0 @@ quad2* QSim::UploadFakePRD(const NP* ip, const NP* prd) // static
-
-

Have any feedback or feature suggestions? Share it here.

@plexoos plexoos force-pushed the fix-slow-cicc-cuda12.5 branch from 92126b9 to 9bdc19d Compare March 28, 2026 00:45
Guard the test-only `_QSim_fake_propagate` launcher and its host entry
point with `!defined(PRODUCTION)`.

In PRODUCTION builds, make `QSim::fake_propagate` fail fast on the host
side instead of compiling the CUDA path.

This avoids the CUDA 12.5.x `cicc` compile-time blow-up in `QSim.cu`
Release builds while leaving the normal runtime propagation code
unchanged and preserving fake-propagate behavior in non-PRODUCTION
builds.

Verified with:
- direct Release `nvcc` compile of `QSim.cu`
- `cmake --build /opt/eic-opticks/build --parallel --target install`
@github-actions github-actions bot dismissed their stale review March 28, 2026 00:46

outdated suggestion

@plexoos plexoos force-pushed the fix-slow-cicc-cuda12.5 branch from 9bdc19d to afb7e19 Compare March 28, 2026 00:46
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Cpp-linter Review

Used clang-format v20.1.2

Click here for the full clang-format patch
diff --git a/qudarap/QSim.cc b/qudarap/QSim.cc
index aac450e..bf8f771 100644
--- a/qudarap/QSim.cc
+++ b/qudarap/QSim.cc
@@ -1522,2 +1521,0 @@ quad2* QSim::UploadFakePRD(const NP* ip, const NP* prd) // static
-
-
diff --git a/qudarap/qsim.h b/qudarap/qsim.h
index f8a94d0..3af2e42 100644
--- a/qudarap/qsim.h
+++ b/qudarap/qsim.h
@@ -1089 +1089,2 @@ inline QSIM_METHOD int qsim::propagate_at_boundary(unsigned& flag, RNG& rng, sct
-    const float u_boundary_burn = curand_uniform(&rng) ;  // needed for random consumption alignment with Geant4 G4OpBoundaryProcess::PostStepDoIt
+    const float u_boundary_burn =
+        curand_uniform(&rng); // needed for random consumption alignment with Geant4 G4OpBoundaryProcess::PostStepDoIt
@@ -1091 +1092 @@ inline QSIM_METHOD int qsim::propagate_at_boundary(unsigned& flag, RNG& rng, sct
-    const float u_reflect = curand_uniform(&rng) ;
+    const float u_reflect = curand_uniform(&rng);

Have any feedback or feature suggestions? Share it here.

@github-actions github-actions bot dismissed their stale review March 28, 2026 00:47

outdated suggestion

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Cpp-linter Review

Used clang-format v20.1.2

Click here for the full clang-format patch
diff --git a/qudarap/qsim.h b/qudarap/qsim.h
index f8a94d0..3af2e42 100644
--- a/qudarap/qsim.h
+++ b/qudarap/qsim.h
@@ -1089 +1089,2 @@ inline QSIM_METHOD int qsim::propagate_at_boundary(unsigned& flag, RNG& rng, sct
-    const float u_boundary_burn = curand_uniform(&rng) ;  // needed for random consumption alignment with Geant4 G4OpBoundaryProcess::PostStepDoIt
+    const float u_boundary_burn =
+        curand_uniform(&rng); // needed for random consumption alignment with Geant4 G4OpBoundaryProcess::PostStepDoIt
@@ -1091 +1092 @@ inline QSIM_METHOD int qsim::propagate_at_boundary(unsigned& flag, RNG& rng, sct
-    const float u_reflect = curand_uniform(&rng) ;
+    const float u_reflect = curand_uniform(&rng);

Have any feedback or feature suggestions? Share it here.

@plexoos plexoos merged commit 22e5d45 into main Mar 29, 2026
3 checks passed
@plexoos plexoos deleted the fix-slow-cicc-cuda12.5 branch March 29, 2026 17:05
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