Skip to content

Conversation

tianyuzhou668
Copy link

针对天数硬件做了适配

Copy link

paddle-bot bot commented Sep 17, 2025

Thanks for your contribution!

img, [ratio_h, ratio_w] = self.resize_image_type1(img)
data["image"] = img
data["shape"] = np.array([src_h, src_w, ratio_h, ratio_w])
data["shape"] = np.array([src_h, src_w, ratio_h, ratio_w]).astype(np.float32)
Copy link
Collaborator

Choose a reason for hiding this comment

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

整体转换成float32的原因是?

Copy link
Author

Choose a reason for hiding this comment

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

天数卡上目前暂不支持double,这里不转的话在dataloader中会存在double的tensor。
感觉这里用fp32也可以,如果主逻辑需要使用fp64的话,我后面把这块另外搞个天数的分支。

Copy link
Collaborator

Choose a reason for hiding this comment

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

这里我不确定是否会对其他硬件造成影响,保守起见,可以单独出一个分支?

Copy link
Author

Choose a reason for hiding this comment

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

好的,我整理一下,单独写个iluvatar的分支

Copy link
Author

Choose a reason for hiding this comment

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

已更新,麻烦有时间再帮忙review一下~

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

Successfully merging this pull request may close these issues.

2 participants