Skip to content
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

[PT FE] Fix sporadic issue in quantized tests #23520

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ def numpy_to_torch_recursively(x):
if not quantized_ops and n_is_not_close > 0:
is_ok = False
print("Max diff is {}".format(max_diff))
elif quantized_ops and (n_is_not_close > int(np.log10(cur_fw_res.size)) or max_diff > np.array(quant_size + fw_eps).max()):
elif quantized_ops and max_diff > np.array(quant_size + fw_eps).max():
# To remove sporadic issues, allow any number of error of 1 quant
is_ok = False
print("Errors outside threshold range: {} with max diff {}, expected at most {} with max diff {}".format(
n_is_not_close, max_diff, int(np.log10(cur_fw_res.size)), quant_size + fw_eps))
Expand Down
Loading