Skip to content

[PIR] fix_test_conv_pir - #61599

Merged
0x45f merged 2 commits into
PaddlePaddle:developfrom
DrRyanHuang:fix_test_conv_pir
Feb 5, 2024
Merged

0x45f merged 2 commits into
PaddlePaddle:developfrom
DrRyanHuang:fix_test_conv_pir

Conversation

@DrRyanHuang

@DrRyanHuang DrRyanHuang commented Feb 4, 2024 •

Copy link
Copy Markdown
Collaborator

PR types

Others

PR changes

Others

Description

修复

2024-02-04 19:16:37   File "/home/Paddle/build/test/legacy_test/decorator_helper.py", line 39, in __fn__
2024-02-04 19:16:37     fn(*args, **kwargs)
2024-02-04 19:16:37   File "/home/Paddle/build/test/legacy_test/test_zero_dim_tensor.py", line 5572, in test_corrcoef
2024-02-04 19:16:37     out = paddle.linalg.corrcoef(x)
2024-02-04 19:16:37   File "/home/Paddle/build/python/paddle/tensor/linalg.py", line 4084, in corrcoef
2024-02-04 19:16:37     c = cov(x, rowvar)
2024-02-04 19:16:37   File "/home/Paddle/build/python/paddle/tensor/linalg.py", line 1779, in cov
2024-02-04 19:16:37     if norm_factor <= 0:
2024-02-04 19:16:37   File "/home/Paddle/build/python/paddle/pir/math_op_patch.py", line 474, in _bool_
2024-02-04 19:16:37     raise TypeError(
2024-02-04 19:16:37 TypeError: bool(Value) is not supported in static graph mode. If you are using @to_static, you can try this:
2024-02-04 19:16:37 1. If you want to get the value of Value, you can switch to non-fullgraph mode by setting @to_static(full_graph=True).
2024-02-04 19:16:37 2. If you want to run it in full graph mode, you need use Value.astype(paddle.bool), and do not use bool(Value).
2024-02-04 19:16:37 ======================================================================
2024-02-04 19:16:37 ERROR: test_cov (test_zero_dim_tensor.TestSundryAPIStatic)
2024-02-04 19:16:37 ----------------------------------------------------------------------
2024-02-04 19:16:37 Traceback (most recent call last):
2024-02-04 19:16:37   File "/home/Paddle/build/python/paddle/pir_utils.py", line 115, in impl
2024-02-04 19:16:37     func(*args, **kwargs)
2024-02-04 19:16:37   File "/home/Paddle/build/test/legacy_test/decorator_helper.py", line 39, in __fn__
2024-02-04 19:16:37     fn(*args, **kwargs)
2024-02-04 19:16:37   File "/home/Paddle/build/test/legacy_test/test_zero_dim_tensor.py", line 5557, in test_cov
2024-02-04 19:16:37     out = paddle.linalg.cov(xt_1)
2024-02-04 19:16:37   File "/home/Paddle/build/python/paddle/tensor/linalg.py", line 1779, in cov
2024-02-04 19:16:37     if norm_factor <= 0:
2024-02-04 19:16:37   File "/home/Paddle/build/python/paddle/pir/math_op_patch.py", line 474, in _bool_
2024-02-04 19:16:37     raise TypeError(
2024-02-04 19:16:37 TypeError: bool(Value) is not supported in static graph mode. If you are using @to_static, you can try this:
2024-02-04 19:16:37 1. If you want to get the value of Value, you can switch to non-fullgraph mode by setting @to_static(full_graph=True).
2024-02-04 19:16:37 2. If you want to run it in full graph mode, you need use Value.astype(paddle.bool), and do not use bool(Value).
2024-02-04 19:16:37 ----------------------------------------------------------------------

@paddle-bot

paddle-bot Bot commented Feb 4, 2024

Copy link
Copy Markdown

你的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.

@paddle-bot paddle-bot Bot added the contributor External developers label Feb 4, 2024
@0x45f
0x45f merged commit 1706cab into PaddlePaddle:develop Feb 5, 2024
@DrRyanHuang
DrRyanHuang deleted the fix_test_conv_pir branch February 5, 2024 13:31
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource 快乐开源活动issue与PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants