Skip to content

Add broadcast_tensors alias, modify result_type #1

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

Merged

Conversation

cangtianhuang
Copy link

@cangtianhuang cangtianhuang commented Apr 1, 2025

详见 PaddlePaddle/Paddle#71788

  • 为 broadcast_tensors 增加 alias:因为输入的 tensors 有不同的 dtype,需要将所有 tensors cast 为统一的最高类型,经 paddle.broadcast_tensors 后再 cast 为初始类型,满足测试要求
  • 修改 result_type ,返回可提升的最高类型

测试结果:

image

@HydrogenSulfate

Copy link
Owner

@HydrogenSulfate HydrogenSulfate left a comment

Choose a reason for hiding this comment

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

LGTM

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

Successfully merging this pull request may close these issues.

2 participants