Skip to content

Commit d6fa808

Browse files
committed
update max setting
1 parent 294175e commit d6fa808

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/cpp/aot_inductor/bert/aot_compile_export.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
set_seed(1)
1414
MAX_BATCH_SIZE = 15
15+
MAX_LENGTH = 1024
1516

1617

1718
def transformers_model_dowloader(
@@ -75,8 +76,8 @@ def transformers_model_dowloader(
7576
attention_mask = torch.cat([inputs["attention_mask"]] * batch_size, 0).to(
7677
device
7778
)
78-
batch_dim = torch.export.Dim("batch", min=1, max=8)
79-
seq_len_dim = torch.export.Dim("seq_len", min=1, max=max_length)
79+
batch_dim = torch.export.Dim("batch", min=1, max=MAX_BATCH_SIZE)
80+
seq_len_dim = torch.export.Dim("seq_len", min=1, max=MAX_LENGTH)
8081
torch._C._GLIBCXX_USE_CXX11_ABI = True
8182
model_so_path = torch._export.aot_compile(
8283
model,

0 commit comments

Comments
 (0)