[Bug Fix]Enabling a specific torch.dynamo config #133
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Category
Bug Fix
Description
运行extractor的时候,可能会因为dynamo的原因(dynamo遇到了不支持的算子,模型包含复杂的控制流,模型的输出包含标量等),捕捉到的整张图被打断,分成了很多很多的子图。
在extractor的时候,log信息多次打印出successfully的时,代表着extractor被拆分成了对应的子图,这时候,只保存了最后一个子图在文件里。
在validate的时候,也会导致对应的报错,甚至还会因为第一次被打断的地方比较靠前,导致只有打断前的一小部分用来计算hash值,导致hash值重复。
本PR增加了torch.dynamo config的来避免模型的输出包含标量时,图被打断。