Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions benchmarks/torchbench_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
{
"test": "eval",
"xla": "PJRT",
"dynamo": None,
}, # TIMEOUT
],
"hf_T5_generate": [
Expand All @@ -85,6 +86,7 @@
{
"test": "eval",
"xla": "PJRT",
"dynamo": None,
}, # TIMEOUT
],
"doctr_det_predictor": [{
Expand Down Expand Up @@ -135,6 +137,13 @@
],
}

# Models that had more graphs to be compiled than the actual size of
# the cache.
NEED_LARGER_CACHE = {
"cm3leon_generate",
"hf_T5_generate",
}


class TorchBenchModelLoader(ModelLoader):

Expand Down Expand Up @@ -401,6 +410,9 @@ def update_process_env(self, process_env):
if precision_flag is not None:
process_env[precision_flag] = '1'

if self.model_name in NEED_LARGER_CACHE:
process_env["XLA_COMPILATION_CACHE_SIZE"] = "2048"

def pick_grad(self):
# special case
if self.model_name in ("maml",):
Expand Down