Skip to content

Commit

Permalink
[CI] Fix a REQUIRE_HIGHER_TOLERANCE comparison bug (pytorch#114870)
Browse files Browse the repository at this point in the history
Pull Request resolved: pytorch#114870
Approved by: https://github.com/jansel
  • Loading branch information
desertfire authored and pytorchmergebot committed Nov 30, 2023
1 parent 386b9c2 commit 1f845d5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions benchmarks/dynamo/timm_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ def pip_install(package):
"xcit_large_24_p8_224": 4,
}

REQUIRE_HIGHER_TOLERANCE = set("sebotnet33ts_256")
REQUIRE_HIGHER_TOLERANCE = {
"fbnetv3_b",
"hrnet_w18",
"inception_v3",
"sebotnet33ts_256",
"selecsls42b",
}

SCALED_COMPUTE_LOSS = {
"ese_vovnet19b_dw",
Expand Down Expand Up @@ -304,8 +310,8 @@ def get_tolerance_and_cosine_flag(self, is_training, current_device, name):
cosine = self.args.cosine
tolerance = 1e-3
if is_training:
if REQUIRE_HIGHER_TOLERANCE:
tolerance = 2 * 1e-2
if name in REQUIRE_HIGHER_TOLERANCE:
tolerance = 4 * 1e-2
else:
tolerance = 1e-2
return tolerance, cosine
Expand Down

0 comments on commit 1f845d5

Please sign in to comment.