Repository navigation
Test dtype - #62146
Closed
0x45f wants to merge 5 commits into
Closed
Test dtype#621460x45f wants to merge 5 commits into
0x45f wants to merge 5 commits into
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
added 4 commits
February 28, 2024 06:42
0x45f
commented
Mar 5, 2024
| from ..base.data_feeder import _NUMPY_DTYPE_2_PADDLE_DTYPE | ||
|
|
||
| dtype = VarDesc.VarType | ||
| dtype = core.DataType |
Collaborator
Author
There was a problem hiding this comment.
这一部分代码可能需要写成两个函数,一个函数bind vartype,另一个函数bind datatype,根据FLAGS_enable_pir_api来决定初始化时调用哪个函数
Collaborator
Author
|
python/paddle/pir_utils.py 的 IrGuard 也需要切换dtype,在__enter__ 时切换为DataType,__exit__时恢复原来的dtype |
This was referenced Mar 6, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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类型。