Hello !
I am in the process of writing a library to emulate stochastic hardware in Pytorch. A simple statement allows me to turn on/off the stochasticity. However, Pytorch code get executed before this simple statement, even though they are declared in the right order, i.e.:
manager.random_off() # get executed second
my_module(tensor) # get executed first

All of this happens in the context of a small test script, on CPU. A few prints helped me to notice it happening. I’m not sure what is happening here, I’m a taker for any help/input/pointer ! Thanks.