fix(qudarap): exclude fake_propagate CUDA path from PRODUCTION builds#255
fix(qudarap): exclude fake_propagate CUDA path from PRODUCTION builds#255
Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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_propagatekernel andQSim_fake_propagate_launchinQSim.cuwith#if !defined(PRODUCTION). - Guard the host-side launcher declaration and make
QSim::fake_propagatefail fast inPRODUCTIONbuilds.
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.
There was a problem hiding this comment.
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.
92126b9 to
9bdc19d
Compare
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`
9bdc19d to
afb7e19
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Guard the test-only
_QSim_fake_propagatelauncher and its host entrypoint with
!defined(PRODUCTION).In PRODUCTION builds, make
QSim::fake_propagatefail fast on the hostside instead of compiling the CUDA path.
This avoids the CUDA 12.5.x
cicccompile-time blow-up inQSim.cuRelease builds while leaving the normal runtime propagation code
unchanged and preserving fake-propagate behavior in non-PRODUCTION
builds.
Verified with:
nvcccompile ofQSim.cucmake --build /opt/eic-opticks/build --parallel --target installAn actual fix for #57