Skip to content

[Bugfix] Guard fabric handle APIs for CUDA < 12.4 compatibility - #36119

Closed
aimbit-ni wants to merge 1 commit into
vllm-project:mainfrom
aimbit-ni:fix-cuda-compat-fabric
Closed

aimbit-ni wants to merge 1 commit into
vllm-project:mainfrom
aimbit-ni:fix-cuda-compat-fabric

Conversation

@aimbit-ni

Copy link
Copy Markdown

Summary

  • CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED and CU_MEM_HANDLE_TYPE_FABRIC were introduced in CUDA 12.4
  • Without a version guard, cumem_allocator.cpp fails to compile on CUDA 12.0–12.3
  • Wraps the fabric detection block in #if CUDA_VERSION >= 12040 so older toolchains skip fabric support gracefully
  • fab_flag remains initialized to 0, so the existing fallback logic at line 130 is unaffected

Introduced in #33540.

Test plan

  • Compiles cleanly on CUDA 12.0 (V12.0.140) — fabric block skipped
  • Compiles cleanly on CUDA 12.8 (V12.8.61) — fabric detection still active
  • pre-commit run --files csrc/cumem_allocator.cpp passes (clang-format, typos)

Signed-off-by: Nikolaos Ioannidis ni@aimbit.de

@mergify mergify Bot added nvidia bug Something isn't working labels Mar 5, 2026
@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors.

You ask your reviewers to trigger select CI tests on top of fastcheck CI.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses a build failure on CUDA versions older than 12.4 by adding a preprocessor guard (#if CUDA_VERSION >= 12040) around code that uses APIs specific to CUDA 12.4 and later. The change is well-contained, uses the standard version macro, and correctly maintains the existing logic for older toolchains. The fix is appropriate and I see no issues with the implementation.

@DarkLight1337
DarkLight1337 requested a review from mgoin March 5, 2026 16:47
@aimbit-ni
aimbit-ni marked this pull request as draft March 5, 2026 17:14
@aimbit-ni
aimbit-ni marked this pull request as ready for review March 5, 2026 17:15
CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED and
CU_MEM_HANDLE_TYPE_FABRIC were introduced in CUDA 12.4. Without a
version guard, cumem_allocator.cpp fails to compile on CUDA 12.0–12.3.

Wrap the fabric detection block in #if CUDA_VERSION >= 12040 so that
older toolchains skip fabric support gracefully. fab_flag remains
initialized to 0, so the existing fallback logic is unaffected.

Tested: compiles cleanly on CUDA 12.0 (V12.0.140) and CUDA 12.8
(V12.8.61).

Introduced in #33540.

Signed-off-by: Nikolaos Ioannidis <ni@aimbit.de>
@aimbit-ni
aimbit-ni force-pushed the fix-cuda-compat-fabric branch from 5bdcebf to ea772e5 Compare March 5, 2026 19:15
@mergify

mergify Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @aimbit-ni.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label May 23, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you!

@github-actions github-actions Bot added the stale Over 90 days of inactivity label Aug 22, 2026
@aimbit-ni aimbit-ni closed this by deleting the head repository Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working needs-rebase nvidia stale Over 90 days of inactivity

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant