Set it anywhere before using any cudnn operation. This flag is checked when cudnn operation is made to choose the algorithm that is then being used.


On the cpu side, setting the same seed on different machines will give the same results. On gpu, cuda’s random number generator is used and I don’t know if it will give your exactly the same thing when using different cards. Similarly, many cuda operation could give slightly different results when ran on different cards because of the architectural change. So I’m not sure that you will be able to reproduce exactly on a different card.