@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 6d85b36a9f
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 4, 21:15 UTC

Revert #38730 and #38791 (#40032)

Signed-off-by: Vadim Gimpelson <vadim.gimpelson@gmail.com> Signed-off-by: Vadim Gimpelson <156319763+vadiklyutiy@users.noreply.github.com>

Vadim Gimpelson committed Apr 21, 2026 at 19:44 UTC 6d85b36a9fa2ac979ad53903358603d2820bf207
3 files changed +8 -11
tests/kernels/attention/test_use_trtllm_attention.py
+2 -2
@@ -72,7 +72,7 @@ def test_supports_sm100_with_artifactory(_art, _cap):
72
73 @patch("vllm.envs.VLLM_BATCH_INVARIANT", False)
74 @patch(
75 - "vllm.utils.flashinfer.current_platform.is_device_capability",
75 + "vllm.utils.flashinfer.current_platform.is_device_capability_family",
76 return_value=False,
77 )
78 def test_supports_non_sm100_platform(_cap):
@@ -81,7 +81,7 @@ def test_supports_non_sm100_platform(_cap):
81
82 @patch("vllm.envs.VLLM_BATCH_INVARIANT", False)
83 @patch(
84 - "vllm.utils.flashinfer.current_platform.is_device_capability",
84 + "vllm.utils.flashinfer.current_platform.is_device_capability_family",
85 return_value=True,
86 )
87 @patch("vllm.utils.flashinfer.has_nvidia_artifactory", return_value=False)
tools/pre_commit/generate_attention_backend_docs.py
+5 -9
@@ -235,11 +235,10 @@ def _resolve_import_to_file(
235
236
237 def _find_cc_in_function(tree: ast.AST, func_name: str) -> str | None:
238 - """Find a compute capability from is_device_capability*() calls in a function.
238 + """Find a compute capability from is_device_capability_family() calls in a function.
239
240 - Handles two patterns:
241 - - is_device_capability_family(N): "M.x" (e.g. 100 -> "10.x")
242 - - is_device_capability(N): "M.m" (e.g. 100 -> "10.0")
240 + Looks for the pattern: current_platform.is_device_capability_family(N)
241 + and converts N (e.g. 100) to a CC string (e.g. "10.x").
242 """
243 for node in ast.walk(tree):
244 if not isinstance(node, ast.FunctionDef) or node.name != func_name:
@@ -248,15 +247,12 @@ def _find_cc_in_function(tree: ast.AST, func_name: str) -> str | None:
247 if (
248 isinstance(n, ast.Call)
249 and isinstance(n.func, ast.Attribute)
250 + and n.func.attr == "is_device_capability_family"
251 and n.args
252 and isinstance(n.args[0], ast.Constant)
253 and isinstance(n.args[0].value, int)
254 ):
255 - val = n.args[0].value
256 - if n.func.attr == "is_device_capability_family":
257 - return f"{val // 10}.x"
258 - elif n.func.attr == "is_device_capability":
259 - return f"{val // 10}.{val % 10}"
255 + return f"{n.args[0].value // 10}.x"
256 return None
257
258
vllm/utils/flashinfer.py
+1
@@ -305,6 +305,7 @@ def supports_trtllm_attention() -> bool:
305 if envs.VLLM_BATCH_INVARIANT:
306 return False
307
308 + # Requires SM100 and NVIDIA artifactory to be accessible to download cubins
309 return (
310 current_platform.is_device_capability_family(100) and has_nvidia_artifactory()
311 )