Deterministic behavior using bilinear2d

I get the following error

RuntimeError: upsample_bilinear2d_backward_out_cuda does not have a deterministic implementation

Is there a workaround?

The workaround would be to use the CPU implementation, i.e. push the data to the CPU before applying this method and back to the GPU afterwards for now assuming that you need the deterministic outputs for debugging (as it would slow down your code).


Thanks! Nice solution, I just run both model and input on cpu to test if everything was reproducible, so after run twice on cpu and have the same result. Now, I will move back to gpu :slight_smile:

Good to hear this workaround seems to work fine. However, note that deterministic methods might have been already implemented in the last months for more methods, so you could install the current nightly release and check if that’s the case for your operations.

1 Like

I changed the F.interpolate of the models that I am using, following this issue (can't reproduce results even set all random seeds · Issue #7068 · pytorch/pytorch · GitHub), and it seems to be working on gpu :slight_smile:

1 Like