Skip to content

Commit 270b3cd

Browse files
changed test file
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
1 parent 9b00cf3 commit 270b3cd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/transformers/models/test_single_subfunction.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from transformers import AutoConfig, AutoModelForCausalLM
1212

1313
from QEfficient.transformers.models.modeling_auto import QEFFAutoModelForCausalLM
14-
from QEfficient.utils.device_utils import get_available_device_id
1514

1615
torch.manual_seed(42)
1716

@@ -81,7 +80,11 @@ def test_subfunction_vs_nonsubfunction(config, tmp_path):
8180

8281
functions_names = get_function(with_sub_func_onnx)
8382
print(functions_names)
84-
if len(functions_names) != 12:
83+
84+
keywords = ["DecoderLayer", "Block", "Layer"]
85+
filtered = [name for name in functions_names if any(key in name for key in keywords)]
86+
87+
if len(filtered) > 1:
8588
raise AssertionError(f"function definition, but found {len(functions_names)} functions: {functions_names}")
8689

8790
if not get_available_device_id():

0 commit comments

Comments
 (0)