The non-deterministic results could be created by e.g. cublas as described in the Reproducibility docs so you could set torch.use_deterministic_algorithms(True) and see, if non-determinsitic algorithms would be used.