You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (GetProcessingSettings().deterministicGPUReconstruction) {
274
-
#ifndef GPUCA_DETERMINISTIC_MODE
275
-
GPUError("WARNING, deterministicGPUReconstruction needs GPUCA_DETERMINISTIC_MODE for being fully deterministic, without only most indeterminism by concurrency is removed, but floating point effects remain!");
276
-
#endif
274
+
if (!detMode) {
275
+
GPUError("WARNING, deterministicGPUReconstruction needs GPUCA_DETERMINISTIC_MODE for being fully deterministic, without only most indeterminism by concurrency is removed, but floating point effects remain!");
GPUError("WARNING, compiled with GPUCA_DETERMINISTIC_MODE but deterministicGPUReconstruction not set, only compile-time determinism and deterministic math enforced, not fully deterministic!");
288
-
#endif
286
+
if (detMode) {
287
+
GPUError("WARNING, compiled with GPUCA_DETERMINISTIC_MODE but deterministicGPUReconstruction not set, only compile-time determinism and deterministic math enforced, not fully deterministic!");
288
+
}
289
289
}
290
290
if (GetProcessingSettings().deterministicGPUReconstruction && GetProcessingSettings().debugLevel >= 6) {
AddOption(fpe, int8_t, -1, "", 0, "Trap on floating point exceptions (-1 = if no ffast-math)")
616
-
AddOption(flushDenormals, bool, true, "", 0, "Enable FTZ and DAZ (Flush all denormals to zero)")
616
+
AddOption(flushDenormals, int8_t, -1, "", 0, "Enable FTZ and DAZ (Flush all denormals to zero), -1 = enable automatically if not prevented by deterministic mode")
617
617
AddOption(solenoidBzNominalGPU, float, -1e6f, "", 0, "Field strength of solenoid Bz in kGaus")
Copy file name to clipboardExpand all lines: GPU/documentation/deterministic-mode.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,3 +30,9 @@ Beyond comparing only the number of clusters and number of tracks, it is also po
30
30
It will create a dump container all (most) intermediate results in text form, which can be compared. The output files is called `CPU.out` if using the CPU backend, and `GPU.out` for the GPU backend.
31
31
Note that the dump files will be huge and the processing will be slow and consume much more memory than normal with `--debug 6 . It has been tested with datasets containing up to 50 Pb-Pb collisions, and might fail for larger data.
32
32
The dump files (if the deterministic mode is used with both compile- and runtime-activation), the files should be 100% identical and can just be compared with `diff`.
33
+
34
+
By default, the deterministic mode will apply flush-to-zero and denormals-are-zero to denormal floats.
35
+
This can be disabled bia `-DDGPUCA_DETERMINISTIC_MODE`.
36
+
Note that some GPUs cannot do precise float computation with denormals flushed to zero, while other GPUs do not support denormals at all.
37
+
Thus, comparison between CPU and GPU deterministic results might require that this setting is either set or not set.
38
+
CPU results for the 2 cases will always differ, since the floating point math will be slightly different.
0 commit comments