The test suite broke between torch==1.11 and torch==1.12 due to JVPs with torch.autograd. Until 1.11 their outcome used to be contiguous, which changed in 1.12. Hence we cannot rely on the PyTorch built-in utility parameters_to_vector, which uses a view under the hood.
This PR makes the test suite compatible with torch==1.12 (also run by the test CI).
The test suite broke between
torch==1.11
andtorch==1.12
due to JVPs withtorch.autograd
. Until1.11
their outcome used to be contiguous, which changed in1.12
. Hence we cannot rely on the PyTorch built-in utilityparameters_to_vector
, which uses aview
under the hood.This PR makes the test suite compatible with
torch==1.12
(also run by the test CI).