Skip to content

[0-size Tensor No.75] Add 0-size Tensor support for hstack #72996

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

enkilee
Copy link
Contributor

@enkilee enkilee commented May 29, 2025

PR Category

Execute Infrastructure

PR Types

Improvements

Description

当前PR为增加单测
develop代码测试cpu和gpu没问题:

aistudio@jupyter-115720-9209764:~/PaddleAPITest$ python engineV2.py --api_config='paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )' --paddle_only=True --test_cpu=True
Main process id: 5178
Options: {'api_config_file': '', 'api_config_file_pattern': '', 'api_config': 'paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )', 'paddle_only': 'True', 'paddle_cinn': False, 'accuracy': False, 'test_amp': False, 'num_gpus': 0, 'num_workers_per_gpu': 1, 'gpu_ids': '', 'required_memory': 10.0, 'test_cpu': True, 'use_cached_numpy': False, 'log_dir': ''}
Test begin: paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )
W0529 02:26:20.905910  5178 gpu_resources.cc:114] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 12.0, Runtime API Version: 11.8
[Pass] paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )
Done.

aistudio@jupyter-115720-9209764:~/PaddleAPITest$ python engineV2.py --api_config='paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )' --paddle_only=True
Main process id: 5407
Options: {'api_config_file': '', 'api_config_file_pattern': '', 'api_config': 'paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )', 'paddle_only': 'True', 'paddle_cinn': False, 'accuracy': False, 'test_amp': False, 'num_gpus': 0, 'num_workers_per_gpu': 1, 'gpu_ids': '', 'required_memory': 10.0, 'test_cpu': False, 'use_cached_numpy': False, 'log_dir': ''}
Test begin: paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )
W0529 02:27:13.070490  5407 gpu_resources.cc:114] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 12.0, Runtime API Version: 11.8
[Pass] paddle.hstack(list[Tensor([0, 1, 1],"float64"),], )
Done.

Copy link

paddle-bot bot commented May 29, 2025

你的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 May 29, 2025
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label May 29, 2025
@enkilee enkilee changed the title [0-size Tensor No.75] Add 0-size Tensor support for log [0-size Tensor No.75] Add 0-size Tensor support for hstack May 29, 2025
d0 = generate_data([], count=1, dtype='float64')
d1 = generate_data([1], count=1, dtype='float64')
self._test_all(rearrange_data(d0, d1))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这几个测试的case都是有关于0-dim的,请补充几个0-size的单测,比如shape为[5,0] 、[0,5]这种

@enkilee
Copy link
Contributor Author

enkilee commented Jun 6, 2025

/re-run all-failed

1 similar comment
@enkilee
Copy link
Contributor Author

enkilee commented Jun 6, 2025

/re-run all-failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants