On windows, the max stack size is 1 MB, whereas it is 8 MB on Linux. So stack overflow occurs more often on windows for large graphs. We run into a stack overflow problem on windows. The cause is recursive function calls in relay/transforms/device_planner.cc. A fix is posted in: #10124
From the code review feedback, the best approach is to rewrite the pass using MixedModeVisitor.
Attached test_pass_plan_devices.py, where test_stack_overflow can be used to expose this bug. In test_stack_overflow, a loop is used to generate a big graph. You can adjust the loop count until stack overflow occurs. I can help to test the fix on windows.
test_pass_plan_devices.zip
On windows, the max stack size is 1 MB, whereas it is 8 MB on Linux. So stack overflow occurs more often on windows for large graphs. We run into a stack overflow problem on windows. The cause is recursive function calls in relay/transforms/device_planner.cc. A fix is posted in: #10124
From the code review feedback, the best approach is to rewrite the pass using MixedModeVisitor.
Attached test_pass_plan_devices.py, where test_stack_overflow can be used to expose this bug. In test_stack_overflow, a loop is used to generate a big graph. You can adjust the loop count until stack overflow occurs. I can help to test the fix on windows.
test_pass_plan_devices.zip