Adnan Akhundov
cc512ea0f6
[inductor] Fix flaky tests in test_aot_inductor.py ( #131994 )
...
Summary:
The `test_model_modified_weights` in `test_aot_inductor.py` has been failing internally for a while. The behavior leading to the test failure was that, after updating the eager model's weights and recompiling the (CPU) model with AOTI, the output of the model was identical to the one before the weights were updated.
The root cause is here in Python:
8927fc209f/test/inductor/test_aot_inductor_utils.py (L69-L71)
which, in turn, instantiates the `Runner` object in C++ relying on `dlopen` for loading the *.so. The problem is that repeated `dlopen` call does not reload the library from the same path, unless `dlclose` is called in-between the two `dlopen` calls. There is `dlclose` in the `Runner`'s destructor, but it's not called, likely due to the way the loaded `runner` gets closed over in Python:
8927fc209f/test/inductor/test_aot_inductor_utils.py (L83-L94)
Here we add copying the *.so file to a unique temporary path right before loading it into a `runner` to avoid the `dlopen` staleness described above. This fixes the `test_model_modified_weights` and, hopefully, will help avoiding similar errors in the future tests.
Test Plan: Tested internally.
Differential Revision: D60348165
Pull Request resolved: https://github.com/pytorch/pytorch/pull/131994
Approved by: https://github.com/chenyang78
2024-07-28 16:55:22 +00:00
..
2024-04-05 18:51:38 +00:00
2024-04-05 18:51:38 +00:00
2024-04-05 18:51:38 +00:00
2024-04-05 18:51:38 +00:00
2024-04-05 18:51:38 +00:00
2024-07-18 00:45:06 +00:00
2024-04-21 14:06:23 +00:00
2024-07-23 01:44:15 +00:00
2024-05-27 14:49:57 +00:00
2024-07-16 12:57:11 +00:00
2024-07-28 03:39:12 +00:00
2024-07-17 16:57:39 +00:00
2024-07-28 04:50:38 +00:00
2024-07-26 14:22:20 +00:00
2024-07-27 18:02:35 +00:00
2024-05-29 13:17:35 +00:00
2024-07-02 14:47:10 +00:00
2024-07-25 03:24:37 +00:00
2024-07-26 16:41:59 +00:00
2024-07-02 12:36:38 +00:00
2024-07-26 09:46:29 +00:00
2024-07-26 03:03:32 +00:00
2024-07-25 17:42:18 +00:00
2024-07-28 16:55:22 +00:00
2024-07-17 02:06:04 +00:00
2024-04-11 23:45:05 +00:00
2024-06-30 01:36:07 +00:00
2024-06-29 00:47:15 +00:00
2024-07-26 18:14:07 +00:00
2024-07-24 20:03:17 +00:00
2024-06-03 18:06:31 +00:00
2024-05-27 14:49:57 +00:00
2024-07-22 04:35:21 +00:00
2024-07-26 15:30:45 +00:00
2024-05-27 14:49:57 +00:00
2024-07-11 17:30:28 +00:00
2024-06-30 11:49:11 +00:00
2024-07-17 02:40:28 +00:00
2024-04-05 18:51:38 +00:00
2024-06-20 08:55:12 +00:00
2024-07-17 06:42:37 +00:00
2024-04-08 20:18:42 +00:00
2024-04-19 17:34:22 +00:00
2024-04-12 03:39:38 +00:00
2024-07-17 06:42:37 +00:00
2024-04-12 03:39:38 +00:00
2024-04-12 03:39:38 +00:00
2024-07-27 19:39:40 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-02 12:29:51 +00:00
2024-05-27 14:49:57 +00:00
2024-07-25 23:50:40 +00:00
2024-07-09 06:14:13 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-06-08 18:16:33 +00:00
2024-03-11 15:35:45 +00:00
2024-04-19 22:01:27 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-05-09 00:51:35 +00:00
2024-07-23 01:44:15 +00:00
2024-07-23 01:44:15 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-04-25 18:31:08 +00:00
2024-07-17 06:42:37 +00:00
2024-07-26 18:08:20 +00:00
2024-07-23 17:48:38 +00:00
2024-07-25 15:54:57 +00:00
2024-06-02 13:38:58 +00:00
2024-07-17 21:56:00 +00:00
2024-07-17 06:42:37 +00:00
2024-06-19 00:05:50 +00:00
2024-07-17 06:42:37 +00:00
2024-05-07 02:36:40 +00:00
2024-07-21 03:45:54 +00:00
2024-05-07 02:36:40 +00:00
2024-07-21 19:26:38 +00:00
2024-07-26 18:44:50 +00:00
2024-07-17 06:42:37 +00:00
2024-05-15 14:50:14 +00:00
2024-05-15 14:50:14 +00:00
2024-05-15 14:50:14 +00:00
2024-06-14 20:28:08 +00:00
2024-07-25 17:42:18 +00:00
2024-06-08 18:16:33 +00:00
2024-07-11 17:30:28 +00:00
2024-05-09 07:39:47 +00:00
2024-07-25 17:42:18 +00:00
2024-07-25 17:42:18 +00:00
2024-05-25 18:23:24 +00:00
2024-07-17 06:42:37 +00:00
2024-05-08 12:13:26 +00:00
2024-07-17 06:42:37 +00:00
2024-04-26 15:35:53 +00:00
2024-05-12 20:02:37 +00:00
2024-07-17 06:42:37 +00:00
2024-04-20 03:37:57 +00:00
2024-06-14 00:12:09 +00:00
2024-07-26 08:36:30 +00:00
2024-05-11 01:52:35 +00:00
2024-07-08 16:06:38 +00:00
2024-07-04 00:53:17 +00:00
2024-07-18 02:15:00 +00:00
2024-05-29 05:18:04 +00:00
2024-06-02 23:25:26 +00:00
2024-07-17 06:42:37 +00:00
2024-05-29 05:18:04 +00:00
2024-07-14 08:17:52 +00:00
2024-07-25 03:24:37 +00:00
2024-07-25 15:54:57 +00:00
2024-06-28 17:48:40 +00:00
2024-04-21 22:26:40 +00:00
2024-07-27 14:45:47 +00:00
2024-07-11 17:30:28 +00:00
2024-05-28 01:42:07 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-06-27 23:16:24 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-26 13:24:41 +00:00
2024-07-25 13:17:19 +00:00
2024-07-14 08:17:52 +00:00
2024-05-09 19:48:22 +00:00
2024-05-09 19:48:22 +00:00
2024-07-11 20:53:52 +00:00
2024-07-25 17:42:18 +00:00
2024-07-28 03:23:04 +00:00
2024-07-27 18:02:35 +00:00
2024-07-24 00:10:49 +00:00
2024-07-15 22:42:27 +00:00
2024-06-24 21:46:49 +00:00
2024-05-02 21:36:18 +00:00
2024-05-29 05:18:04 +00:00
2024-07-22 18:23:21 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-11 17:30:28 +00:00
2024-06-13 06:58:07 +00:00
2024-07-18 18:30:13 +00:00
2024-07-20 02:41:10 +00:00
2024-06-02 23:25:26 +00:00
2024-07-12 13:55:13 +00:00
2024-07-16 08:39:00 +00:00
2024-06-17 18:55:47 +00:00
2024-07-08 04:10:56 +00:00
2024-07-20 02:41:10 +00:00
2024-07-17 06:42:37 +00:00
2024-07-23 21:50:55 +00:00
2024-07-27 03:58:49 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-05-29 05:18:04 +00:00
2024-07-17 06:42:37 +00:00
2024-06-06 14:21:29 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00
2024-07-17 06:42:37 +00:00