According to the this page, there are a set of functions that become non-deterministic if torch.use_deterministic_algorithms is invoked with True. This means we have to add a whole series of checks for functions if this function is either not invoked or invoked with False.
Note that I'm assuming that a global state is set that is within module scope. That is, since the linter does static checks, we have no good way of knowing if this function is invoked already in a different module. So we have to be "module-oriented" in our static checks. That is, we will check if this function was invoked with True in the current module and if we do not see that in a given module, we will assume that it was not invoked even though in run-time it may have. We will have to make this distinction clear to the end user.
According to the this page, there are a set of functions that become non-deterministic if
torch.use_deterministic_algorithms
is invoked withTrue
. This means we have to add a whole series of checks for functions if this function is either not invoked or invoked withFalse
.Note that I'm assuming that a global state is set that is within module scope. That is, since the linter does static checks, we have no good way of knowing if this function is invoked already in a different module. So we have to be "module-oriented" in our static checks. That is, we will check if this function was invoked with
True
in the current module and if we do not see that in a given module, we will assume that it was not invoked even though in run-time it may have. We will have to make this distinction clear to the end user.