-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Combine amp and qat #33484
Combine amp and qat #33484
Conversation
if (op_type == "moving_average_abs_max_scale") { | ||
for (const auto& pair : ins) { | ||
if (pair.first == "X" && | ||
pair.second.front()->DataType() == | ||
framework::proto::VarType::FP16) { | ||
dst_type = framework::proto::VarType::FP16; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can it be handled like "batch_norm", as the code below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moving_average_abs_max_scale only considers the dtype of input(X) to determine the dest_type. However, "batch_norm" just cast the input(X) to FP16 or FP32. These are two different cases.
Sorry to inform you that bbe2e45's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Others
Describe