Paddle Min(3,2,1) gives 0

7hiiyaii  于 2022-11-19  发布在  其他
关注(0)|答案(4)|浏览(158)

bug描述 Describe the Bug

Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import paddle
paddle.version.show()
full_version: 2.3.1
major: 2
minor: 3
patch: 1
rc: 0
cuda: 11.4
cudnn: 8.4.1
paddle.min(paddle.to_tensor([3,2,1]))
W1104 13:01:20.953553 866 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.2, Driver API Version: 11.4, Runtime API Version: 11.4
W1104 13:01:20.958160 866 gpu_resources.cc:91] device: 0, cuDNN Version: 8.4.
Tensor(shape=[1], dtype=int64, place=Place(gpu:0), stop_gradient=True,
[0])
paddle.min(paddle.to_tensor([3,2,1]))
Tensor(shape=[1], dtype=int64, place=Place(gpu:0), stop_gradient=True,
[0])
x = paddle.to_tensor([3,2,1])
x
Tensor(shape=[3], dtype=int64, place=Place(gpu:0), stop_gradient=True,
[3, 2, 1]
paddle.min(x)
Tensor(shape=[1], dtype=int64, place=Place(gpu:0), stop_gradient=True,
[0])y = paddle.to_tensor([[3],[2],[1]])
y
Tensor(shape=[3, 1], dtype=int64, place=Place(gpu:0), stop_gradient=True,
[[3],
[2],
[1]])
paddle.min(y)
Tensor(shape=[1], dtype=int64, place=Place(gpu:0), stop_gradient=True,
[3])
paddle.min(y)
Tensor(shape=[1], dtype=int64, place=Place(gpu:0), stop_gradient=True,
[0])
paddle.min(y)
Tensor(shape=[1], dtype=int64, place=Place(gpu:0), stop_gradient=True,
[3])
paddle.min(y)
Tensor(shape=[1], dtype=int64, place=Place(gpu:0), stop_gradient=True,
[0])

paddle.min(paddle.to_tensor([3,2,1])) returns 0. Should return 1.
paddle.min(paddle.to_tensor([[3],[2],[1]])) alternatingly returns 0 and 3, should always return 1

Environment Information:
summary_env.py:51: DeprecationWarning: distro.linux_distribution() is deprecated. It should only be used as a compatibility shim with Python's platform.linux_distribution(). Please use distro.id(), distro.version() and distro.name() instead.
plat = distro.linux_distribution()[0]
summary_env.py:52: DeprecationWarning: distro.linux_distribution() is deprecated. It should only be used as a compatibility shim with Python's platform.linux_distribution(). Please use distro.id(), distro.version() and distro.name() instead.
ver = distro.linux_distribution()[1]

Paddle version: 2.3.1
Paddle With CUDA: True

OS: Ubuntu 20.04
Python version: 3.8.10

CUDA version: 11.4.239
Build cuda_11.4.r11.4/compiler.31294910_0
cuDNN version: None.None.None
Nvidia driver version: None

docker with nvidia-runtime

其他补充信息 Additional Supplementary Information

No response

oogrdqng

oogrdqng1#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网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!

ozxc1zmp

ozxc1zmp2#

请问你这个case在CPU下运行是正常的嘛?

yyyllmsg

yyyllmsg3#

What do you mean? As far as I'm aware it's running on GPU.

42fyovps

42fyovps4#

The problem has been fed back to the API director. The following exhibitions will be synchronized with you here~

相关问题