Skip to content

Support device for InitDataTypeGeneralizationPasses and optimize codes.#701

Merged
Xreki merged 2 commits intoPaddlePaddle:developfrom
Xreki:fix_init_dtype
May 8, 2026
Merged

Support device for InitDataTypeGeneralizationPasses and optimize codes.#701
Xreki merged 2 commits intoPaddlePaddle:developfrom
Xreki:fix_init_dtype

Conversation

@Xreki
Copy link
Copy Markdown
Collaborator

@Xreki Xreki commented May 8, 2026

PR Category

Bug Fix

Description

  1. InitDataTypeGeneralizationPasses支持配置device,避免device不一致的错误
  2. 少量代码优化,主要是封装公共函数加强代码复用

Xreki and others added 2 commits May 8, 2026 14:48
Extract shared logic into module-level helpers: _choose_device,
_load_and_trace_model, _apply_dtype_pass. Replace hardcoded string
with kDataTypeGeneralizationPasses constant, remove unused variable
in _update_sample_metadata, and fix type annotation for _copy_sample.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented May 8, 2026

Thanks for your contribution!

@Xreki Xreki requested a review from fangfangssj May 8, 2026 08:58
Copy link
Copy Markdown
Collaborator

@fangfangssj fangfangssj left a comment

Choose a reason for hiding this comment

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

LGTM

@Xreki Xreki merged commit e3cd5ce into PaddlePaddle:develop May 8, 2026
3 checks passed
@Xreki Xreki deleted the fix_init_dtype branch May 8, 2026 09:41
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