Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpTest和Paddle API冲突 #69416

Open
TimeYWL opened this issue Nov 15, 2024 · 4 comments
Open

OpTest和Paddle API冲突 #69416

TimeYWL opened this issue Nov 15, 2024 · 4 comments
Assignees

Comments

@TimeYWL
Copy link
Contributor

TimeYWL commented Nov 15, 2024

bug描述 Describe the Bug

运行test/legacy_test下面的测试用例,会报以下错误:

ERROR: test_check_output (test_activation_op.TestExpFp32_Prim)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/workspace/Paddle-Develop/build/test/legacy_test/test_activation_op.py", line 132, in test_check_output
    self.check_output(
  File "/workspace/Paddle-Develop/build/test/legacy_test/op_test.py", line 2954, in check_output
    res = self.check_output_with_place(
  File "/workspace/Paddle-Develop/build/test/legacy_test/op_test.py", line 2787, in check_output_with_place
    dygraph_checker.check()
  File "/workspace/Paddle-Develop/build/test/legacy_test/op_test.py", line 2334, in check
    self.calculate_output()
  File "/workspace/Paddle-Develop/build/test/legacy_test/op_test.py", line 2406, in calculate_output
    dygraph_outs = self.op_test._calc_python_api_output(place)
  File "/workspace/Paddle-Develop/build/test/legacy_test/op_test.py", line 1160, in _calc_python_api_output
    else self.append_input_output_for_dygraph(
  File "/workspace/Paddle-Develop/build/test/legacy_test/op_test.py", line 1064, in append_input_output_for_dygraph
    v = create_var(
  File "/workspace/Paddle-Develop/build/test/legacy_test/op_test.py", line 1013, in create_var
    type=core.VarDesc.VarType.DENSE_TENSOR,
AttributeError: type object 'paddle.base.libpaddle.VarType' has no attribute 'DENSE_TENSOR'

怀疑是paddle最新的api和OpTest之间使用的api有冲突?

其他补充信息 Additional Supplementary Information

No response

@co63oc
Copy link
Contributor

co63oc commented Nov 15, 2024

core.VarDesc.VarType.LOD_TENSOR已修改为core.VarDesc.VarType.DENSE_TENSOR,请 安装 最新版本paddle

@TimeYWL
Copy link
Contributor Author

TimeYWL commented Nov 15, 2024

DENSE_TENSOR

怀疑LOD_TENSOR修改为DENSE_TENSOR的过程中,未在rocm环境下实现,或许此PR出了问题?
在编译develop版的paddle后,运行以下指令报错:

Python 3.10.12 (main, May 26 2024, 00:14:02) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import  paddle
>>> a = paddle.base.core.VarDesc.VarType.DENSE_TENSOR
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'paddle.base.libpaddle.VarType' has no attribute 'DENSE_TENSOR'
>>> 

@co63oc
Copy link
Contributor

co63oc commented Nov 15, 2024

可以查看 paddle.base.core.VarDesc.VarType.LOD_TENSOR 是否存在,如果这个存在是旧的版本

@co63oc
Copy link
Contributor

co63oc commented Nov 15, 2024

image
试了安装新版本,可能是最新版本还没有编译,那或者等新安装包编译或者用源码编译了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants