torch-mlir/e2e_testing
Ramiro Leal-Cavazos 4a96e716c0
Use `register_buffer` to make `Add_Module` test work on lazy tensor (#2332)
Doing `module.to('lazy')` only moves the module member tensors to the
device if they are created with `self.register_buffer` or
`self.register_parameter`. Since the `self.tensor` tensor in
`Add_Module` test is currently not created using the `self.register_*`
methods, it is not being moved from CPU to lazy device, which is
causing the test to fail on LTC backend. This commit uses
`self.register_buffer` to fix the test on LTC backend.

This commit also seems to fix the test for torchdynamo.
2023-07-24 09:07:13 -07:00
..
main.py Use `register_buffer` to make `Add_Module` test work on lazy tensor (#2332) 2023-07-24 09:07:13 -07:00
xfail_sets.py Use `register_buffer` to make `Add_Module` test work on lazy tensor (#2332) 2023-07-24 09:07:13 -07:00