Solved by ptrblck in post #3 
              
              
                at::globalContext().setBenchmarkCuDNN(flag) should work in C++. 
However, benchmark is off by default so I guess that’s not the root cause of the non-deterministic results. 
You could try to use at::globalContext().deterministicCuDNN() or at::globalContext().setDeterministic() in the nightly binarie…