Skip to content

Commit b74bb47

Browse files
committed
GPU: refuse deterministic mode on Metal
Simply not working for now
1 parent 150990b commit b74bb47

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎GPU/Common/GPUCommonDef.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@
8181
#define GPUCA_RTC_CONSTEXPR
8282
#endif
8383

84+
#if defined(GPUCA_DETERMINISTIC_MODE) && defined(__METAL__)
85+
// The deterministic paths compute the transcendentals in double (see
86+
// GPUCommonMath::SinCos). The emulated double is bit-exact for + - * / but
87+
// its sin and cos are within 2 ulp of libm, not identical to it, so the
88+
// results could not match the other backends.
89+
#error "GPUCA_DETERMINISTIC_MODE is not supported on Metal"
90+
#endif
91+
8492
#ifndef GPUCA_DETERMINISTIC_CODE
8593
#ifdef GPUCA_DETERMINISTIC_MODE
8694
#define GPUCA_DETERMINISTIC_CODE(det, indet) det // In deterministic mode, take deterministic code path

0 commit comments

Comments
 (0)