Skip to content

[CPU] 多个 Paddle 算子在 float16 输入下报 NotFound kernel #78466

@tingPetty

Description

@tingPetty

bug描述 Describe the Bug

pd_tf_test_1 的最小复现集中,多组 API 在 CPU + float16 输入下报错:
RuntimeError: (NotFound) The kernel with key (CPU, Undefined(AnyLayout), float16) of kernel <op> is not registered.
查询文档发现文档中显示这些API应该是支持float6类型的,并且对照框架 TensorFlow 在对应 case 下成功,涉及算子脚本:
pd_error_only_candidate_002_abs.py
pd_error_only_candidate_008_allclose.py
pd_error_only_candidate_025_cosh.py
pd_error_only_candidate_157_multiply.py

# 最小可复现代码。
import numpy as np
import paddle

print("paddle:", paddle.__version__)

x = paddle.to_tensor(np.ones((4, 4), dtype=np.float16))
print(paddle.abs(x))
带有完整回溯的报错信息。
RuntimeError: (NotFound) The kernel with key (CPU, Undefined(AnyLayout), float16)
of kernel `abs` is not registered.

其他补充信息 Additional Supplementary Information

  • 复现环境:Windows 11,Python 3.10.18,Paddle 3.2.0,CPU。

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions