Repository navigation
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
Member
def test_x_dtype_check():
# the Input(x)'s dtype must be one of [bool, float16, float32, float64, int32, int64]
x1 = paddle.static.data(
name='x1', shape=[-1, 10, 5, 3], dtype='int8'
)
paddle.transpose(x1, perm=[1, 0, 2])
self.assertRaises(TypeError, test_x_dtype_check)这块可能静态图的类型检查又一些滞后,可以看下能不能改一下transpose里的api,参考#60488 这里面的 mean 处理方法 |
0x45f
reviewed
Jan 29, 2024
| x1 = paddle.static.data( | ||
| name='x1', shape=[-1, 10, 5, 3], dtype='int8' | ||
| ) | ||
| paddle.transpose(x1, perm=[1, 0, 2]) |
Collaborator
There was a problem hiding this comment.
transpose 的 kernel是支持int8类型的,只是老静态图python端检查代码有些滞后,需要在python/paddle/tensor/linalg.py的transpose函数老静态图分支的check_variable_and_dtype加上int8类型。然后这个测试case就可以不用加not in_pir_mode 的判断了
0x45f
reviewed
Jan 30, 2024
0x45f
reviewed
Feb 2, 2024
| # the Input(x)'s dtype must be one of [bool, float16, float32, float64, int32, int64] | ||
| x1 = paddle.static.data( | ||
| name='x1', shape=[-1, 10, 5, 3], dtype='int8' | ||
| if core.is_compiled_with_cuda(): |
Collaborator
There was a problem hiding this comment.
transpose的cpu kernel也注册了float16类型,参见paddle/phi/kernels/cpu/transpose_kernel.cc。所以把这个测试case删掉吧~
Collaborator
|
CI有点问题没有触发,辛苦merger下develop然后再push一下,重新触发下CI~ |
0x45f
approved these changes
Feb 19, 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
A17 transpose