You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.
Fixes an issue where the comparison of variable dtypes was incorrect in the `monkey_patch_tensor` function. The comparison now correctly checks the dtype of the variable.
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 types
Others
PR changes
Others
Description
目前框架内有两套dtype的表示,一套是老静态图的VarType,一套是PIR下的DataType。动态图在c++端底层的dtype都是DataType,但是之前应该是为了兼容,所以动态图python的dtype也还是VarType类型。
这个pr主要是想修改python端的paddle.dtype,在PIR下paddle.dtype返回的是DataType类型;在老静态图下返回的是VarType类型。
通过将动态图切分成 PIR 和非 PIR 模式,以确保在任何一种情况下 dtype 都是动静统一的,以免添加众多繁杂的转换、特殊处理逻辑,在不久的将来,左侧的
not use_pir_api
场景就可以完全废弃掉了Important
本 PR 主要影响是在开启
FLAGS_enable_pir_api=True
场景下动态图的行为(含动转静),当然,CI 上目前没有这种测试(除动转静单测,动转静单测整体还是跑在动态图下,因此会测到部分动态图相关逻辑),因此测试可能是不全面的,这就需要未来去逐渐针对适配升级,不过当前 PR 已经手动在部分 Seg、Detection 模型上测试开启FLAGS_enable_pir_api=True
通过,更多的场景可能需要在合入后联动「SOT+PIR」模型测试一同测试和修复(就目前经验而言,这类问题修复非常快)参考 #62146