Paddle Tensor.any() [operator < reduce_any > error]

tjvv9vkg  于 2022-11-19  发布在  其他
关注(0)|答案(1)|浏览(149)

bug描述 Describe the Bug

请问,是reduce_any算子里的kernel还没实现吗?有什么替代方案吗?

import paddle
a = paddle.rand([4,4,4,4])
a.any()

报错信息:

W1118 20:43:02.138398 399 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.2, Runtime API Version: 11.2
W1118 20:43:02.143416 399 gpu_resources.cc:91] device: 0, cuDNN Version: 8.2.

RuntimeError Traceback (most recent call last)
/tmp/ipykernel_399/3841100286.py in
1 import paddle
2 a = paddle.rand([4,4,4,4])
----> 3 a.any()

/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/tensor/math.py in any(x, axis, keepdim, name)
3264 axis = axis if axis != None and axis != [] else [0]
3265 return _C_ops.reduce_any(x, 'dim', axis, 'keep_dim', keepdim,
-> 3266 'reduce_all', reduce_all_flag)
3267
3268 attrs = {

RuntimeError: (NotFound) There are no kernels which are registered in the reduce_any operator.
[Hint: Expected kernels_iter != all_op_kernels.end(), but received kernels_iter == all_op_kernels.end().] (at /paddle/paddle/fluid/imperative/prepared_operator.cc:341)
[operator < reduce_any > error]

其他补充信息 Additional Supplementary Information

No response

jdgnovmf

jdgnovmf1#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档常见问题历史IssueAI社区 来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

相关问题