Skip to content

Commit ead506c

Browse files
authored
refactor(sysrap): remove experimental curand variants and dead test paths (#307)
This PR removes two experimental RNG branches that are no longer part of the supported runtime path and add ongoing maintenance cost: - curand-done-right integration was only used by standalone experimental tests and not by normal CMake/CTest targets. - RNG_PHILITEOX and curandlite added conditional complexity across SysRap and QUDARap while default builds already use RNG_PHILOX. Keeping these unused paths increases review surface, complicates compile-time branching, and risks bit-rot in code that is not exercised in normal CI workflows. This change simplifies the RNG model to the actively used options.
1 parent a1dba1f commit ead506c

18 files changed

Lines changed: 16 additions & 657 deletions

qudarap/QSim.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,12 +2051,6 @@ std::string QSim::Desc(char delim) // static
20512051
<< "RNG_PHILOX"
20522052
#else
20532053
<< "NOT-RNG_PHILOX"
2054-
#endif
2055-
<< delim
2056-
#ifdef RNG_PHILITEOX
2057-
<< "RNG_PHILITEOX"
2058-
#else
2059-
<< "NOT-RNG_PHILITEOX"
20602054
#endif
20612055
<< delim
20622056
;

qudarap/qrng.h

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -146,35 +146,3 @@ struct qrng<Philox>
146146
void set_uploaded_states( void* ){}
147147
#endif
148148
};
149-
150-
151-
#ifdef RNG_PHILITEOX
152-
template<>
153-
struct qrng<PhiloxLite>
154-
{
155-
ULL seed ;
156-
ULL offset ;
157-
ULL skipahead_event_offset ;
158-
159-
#if defined(__CUDACC__) || defined(__CUDABE__)
160-
QRNG_METHOD void init(PhiloxLite& rng, unsigned long long event_idx, unsigned long long photon_idx )
161-
{
162-
ULL subsequence_ = photon_idx ;
163-
curand_init( seed, subsequence_, offset, &rng ) ;
164-
ULL skipahead_ = skipahead_event_offset*event_idx ;
165-
skipahead( skipahead_, &rng );
166-
}
167-
#else
168-
qrng(ULL seed_, ULL offset_, ULL skipahead_event_offset_ )
169-
:
170-
seed(seed_),
171-
offset(offset_),
172-
skipahead_event_offset(skipahead_event_offset_)
173-
{
174-
}
175-
void set_uploaded_states( void* ){}
176-
#endif
177-
};
178-
#endif
179-
180-

sysrap/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,6 @@ set(SOURCES
111111
SFastSim_Debug.cc
112112
SFastSimOpticalModel.cc
113113
)
114-
115-
116-
set(CURANDLITE_HEADERS
117-
curandlite/curandStatePhilox4_32_10_OpticksLite.h
118-
)
119114

120115

121116
set(HEADERS
@@ -646,7 +641,7 @@ PLOG_LOCAL
646641
integration with packages (like junosw) that do not hide
647642
symbols by default
648643
649-
RNG_XORWOW/RNG_PHILOX/RNG_PHILITEOX
644+
RNG_XORWOW/RNG_PHILOX
650645
Use one of these to pick the curandState implementation, in srng.h
651646
picking RNG_XORWOW requires curandState files which slows
652647
down initialization greatly when simulating many millions
@@ -685,7 +680,6 @@ target_compile_definitions( ${name} PUBLIC WITH_SLOG)
685680
endif()
686681

687682
install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/sysrap/)
688-
install(FILES ${CURANDLITE_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/curandlite)
689683

690684
install(TARGETS ${name}
691685
EXPORT ${PROJECT_NAME}Targets

sysrap/SEventConfig.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ const char* SEventConfig::_HitMaskDefault = "SD" ;
7878

7979

8080
#if defined(RNG_XORWOW)
81-
const char* SEventConfig::_MaxSlotDefault = ;
81+
const char* SEventConfig::_MaxSlotDefault = WITH_STATE_LIMIT ;
8282
const char* SEventConfig::_MaxGenstepDefault = WITH_STATE_LIMIT ;
8383
const char* SEventConfig::_MaxPhotonDefault = WITH_STATE_LIMIT ;
8484
const char* SEventConfig::_MaxSimtraceDefault = WITH_STATE_LIMIT ;
8585
const char* SEventConfig::_MaxCurandDefault = WITH_STATE_LIMIT ;
8686

87-
#elif defined(RNG_PHILOX) || defined(RNG_PHILITEOX)
87+
#elif defined(RNG_PHILOX)
8888
const char* SEventConfig::_MaxSlotDefault = "0" ; // see SEventConfig::SetDevice : set according to VRAM
8989
const char* SEventConfig::_MaxGenstepDefault = NO_STATE_LIMIT_GENSTEP ; // adhoc
9090
const char* SEventConfig::_MaxPhotonDefault = NO_STATE_LIMIT ;
@@ -1973,4 +1973,3 @@ uint64_t SEventConfig::AllocEstimateTotal(int _max_slot)
19731973
delete estimate ;
19741974
return total ;
19751975
}
1976-

sysrap/curand-done-right/curanddr.hxx

Lines changed: 0 additions & 163 deletions
This file was deleted.

sysrap/curandlite/LICENSE.txt

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)