4 ms·
Yes, it's not truly deterministic, but setting to 0 still makes it relatively less random
by toxicFork 3y ago
Yes, it's not truly deterministic, but setting to 0 still makes it relatively less random
- KeplerBoy 3y agoComputations carried out on GPUs are hardly ever deterministic. Things happen in parallel and as we known not even something as basic as adding up a bunch of floats is associative. Combining that with the fact that CUDA makes few guarantees about the order your operations will be carried out (at the block level) makes true deterministic behavior unachievable.
- simonw 3y agoThank you! That really helped me understand this issue. I got ChatGPT Code Interpreter to generate an example for me: a = 0.1 b = 0.2 c = 0.3 result1 = (a + b) + c result2 = a + (b + c) (result1, result2, result1 == result2) Output: (0.6000000000000001, 0.6, False)
- monkeydust 3y agoInterestingly when I copy paste your example I get true. Perhaps that itself is the example