Commit bc09b0d
authored
Restore compatibility with PT 1.9.1 (openvinotoolkit#1806)
### Changes
If running on Torch < 1.12, do not use
`register_load_state_dict_post_hook` and do level range updates on each
forward instead.
### Reason for changes
E2E tests for torch 1.9.1 failing, because
`torch.nn.Module.register_load_state_dict_post_hook` has only been added
in 1.12.
### Related tickets
N/A
### Tests
E2E PT 1.9.1 run TBA1 parent b07b652 commit bc09b0d
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
| 326 | + | |
325 | 327 | | |
326 | 328 | | |
327 | 329 | | |
| |||
347 | 349 | | |
348 | 350 | | |
349 | 351 | | |
| 352 | + | |
| 353 | + | |
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
| |||
614 | 618 | | |
615 | 619 | | |
616 | 620 | | |
617 | | - | |
618 | | - | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
619 | 626 | | |
620 | 627 | | |
621 | 628 | | |
| |||
0 commit comments