Skip to content

[Bug] Update DevicePlanner to use MixedModeVisitor #10135

Description

@mei-ye

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions