Closed
Description
🐛 Describe the bug
RProp does not update noncontiguous params. I haven't dug into the why, but our simplest directional test case on test_forloop_goes_right_direction fails:
======================================================================
FAIL: test_forloop_goes_right_direction_contiguous_False_Rprop_mps_float32 (__main__.TestOptimRenewedMPS)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/janeyx/pytorch/torch/testing/_internal/common_utils.py", line 2689, in wrapper
method(*args, **kwargs)
File "/Users/janeyx/pytorch/torch/testing/_internal/common_device_type.py", line 416, in instantiated_test
result = test(self, **param_kwargs)
File "/Users/janeyx/pytorch/torch/testing/_internal/common_utils.py", line 1366, in wrapper
fn(*args, **kwargs)
File "/Users/janeyx/pytorch/torch/testing/_internal/common_optimizers.py", line 181, in test_wrapper
return test(*args, **kwargs)
File "/Users/janeyx/pytorch/test/test_optim.py", line 94, in test_forloop_goes_right_direction
self.assertLess(closure().item(), initial_value)
AssertionError: 135.77398681640625 not less than 135.77398681640625
To execute this test, run the following from the base repo dir:
python test/test_optim.py -k test_forloop_goes_right_direction_contiguous_False_Rprop_mps_float32
This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
Versions
on main
cc @vincentqb @jbschlosser @albanD @crcrpar @kulinseth @malfet @DenisVieriu97 @razarmehr