Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

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: 9 additions & 3 deletions tests/py/dynamo/llm/test_llm_models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import importlib
import os
import sys
import unittest

import pytest
import torch
Expand All @@ -9,13 +11,17 @@
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../../tools/llm"))
import argparse

from run_llm import compile_torchtrt
from torchtrt_ext import register_sdpa


@pytest.mark.unit
@pytest.mark.parametrize("precision", ["FP16", "BF16", "FP32"])
@unittest.skipIf(
not importlib.util.find_spec("modelopt"),
"ModelOpt is required to run this test",
)
def test_llm_decoder_layer(precision):
from run_llm import compile_torchtrt
from torchtrt_ext import register_sdpa

if torch_tensorrt.ENABLED_FEATURES.tensorrt_rtx and precision == "BF16":
pytest.skip("TensorRT-RTX does not support bfloat16, skipping test")
with torch.inference_mode():
Expand Down
Loading