Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ def _launch(
hash_key = (device, vec, *PerTokenAdaLN.make_hash_key(*torch_tensors))
compiled_fn = _COMPILE_CACHE.get(hash_key)
if compiled_fn is None:
if torch.cuda.get_device_capability(device) != (10, 0):
raise ValueError("fused per-token AdaLN requires an SM100 GPU")
if torch.cuda.get_device_capability(device) not in ((10, 0), (10, 3)):
raise ValueError("fused per-token AdaLN requires an SM100 or SM103 GPU")
kernel = PerTokenAdaLN(D, vec)
fake_sig_args = [_to_fake_cute_arg(t) for t in torch_tensors]
compiled_fn = cute.compile(kernel, *fake_sig_args, options="--enable-tvm-ffi")
Expand Down
2 changes: 1 addition & 1 deletion tensorrt_llm/_torch/visual_gen/models/wan/utils_wan.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _pertoken_adaln_arch_ok(device: torch.device) -> bool:
if device.type != "cuda" or not torch.cuda.is_available():
return False
try:
return torch.cuda.get_device_capability(device) == (10, 0)
return torch.cuda.get_device_capability(device) in ((10, 0), (10, 3))
except RuntimeError:
return False

Expand Down
7 changes: 5 additions & 2 deletions tests/unittest/_torch/visual_gen/test_pertoken_adaln.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@


def _require_sm100() -> torch.device:
if not torch.cuda.is_available() or torch.cuda.get_device_capability() != (10, 0):
pytest.skip("The fused per-token AdaLN kernel requires an SM100 GPU.")
if not torch.cuda.is_available() or torch.cuda.get_device_capability() not in (
(10, 0),
(10, 3),
):
pytest.skip("The fused per-token AdaLN kernel requires an SM100 or SM103 GPU.")
return torch.device("cuda", torch.cuda.current_device())


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _assert_pipeline_matches_hf(
assert trtllm_pipe.transformer_2 is None
assert trtllm_pipe.expand_timesteps is True

is_sm100 = torch.cuda.get_device_capability() == (10, 0)
is_sm100 = torch.cuda.get_device_capability() in ((10, 0), (10, 3))
plain_call = None
residual_call = None
with ExitStack() as stack:
Expand Down Expand Up @@ -443,7 +443,7 @@ def test_fp8_cache_dit_trtllm(self):
assert t2v_result.video.dim() == 5
B, _T, H, W, C = t2v_result.video.shape
assert B == 1 and H == 704 and W == 1280 and C == 3
if torch.cuda.get_device_capability() == (10, 0):
if torch.cuda.get_device_capability() in ((10, 0), (10, 3)):
assert all(block._pertoken_adaln._enabled for block in pipeline.transformer.blocks)

assert pipeline.cache_accelerator is not None
Expand Down
Loading