Skip to content

Commit

Permalink
fix: Increase block size to reduce compile time BERT
Browse files Browse the repository at this point in the history
  • Loading branch information
gs-olive committed Aug 10, 2023
1 parent 858d41d commit b7d9d5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
4 changes: 1 addition & 3 deletions tests/py/dynamo/converters/test_casts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
import torch.nn as nn
from harness import DispatchTestCase
from torch.testing._internal.common_utils import run_tests
from torch_tensorrt.dynamo.conversion.trt_interpreter import (
UnsupportedOperatorException,
)
from torch_tensorrt.dynamo.conversion import UnsupportedOperatorException


class TestToCopyConverter(DispatchTestCase):
Expand Down
15 changes: 5 additions & 10 deletions tests/py/dynamo/models/test_models.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import torch
import timm
import pytest
import unittest

import pytest
import timm
import torch
import torch_tensorrt as torchtrt
import torchvision.models as models

from torch_tensorrt.dynamo.utils import COSINE_THRESHOLD, cosine_similarity
from transformers import BertModel

from torch_tensorrt.dynamo.utils import (
COSINE_THRESHOLD,
cosine_similarity,
)

assertions = unittest.TestCase()


Expand Down Expand Up @@ -143,7 +138,7 @@ def test_bert_base_uncased(ir):
"ir": ir,
"pass_through_build_failures": True,
"optimization_level": 1,
"min_block_size": 10,
"min_block_size": 15,
"ir": "torch_compile",
}
trt_mod = torchtrt.compile(model, **compile_spec)
Expand Down

0 comments on commit b7d9d5a

Please sign in to comment.