Auto-detect CUTLASS for EvoformerAttention#8000
Open
MaxTretikov wants to merge 1 commit intodeepspeedai:masterfrom
Open
Auto-detect CUTLASS for EvoformerAttention#8000MaxTretikov wants to merge 1 commit intodeepspeedai:masterfrom
MaxTretikov wants to merge 1 commit intodeepspeedai:masterfrom
Conversation
Signed-off-by: Max Tretikov <max@tretikov.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DS4Sci EvoformerAttention currently depends on CUTLASS, but requiring users to manually set
CUTLASS_PATHcreates unnecessary friction for an otherwise standard extension build flow. This change makes CUTLASS discovery automatic while preservingCUTLASS_PATHas the explicit override.The discovery approach is based on PyTorch's CUDA detection pattern in
torch.utils.cpp_extension: honor the explicit environment variable first, then infer from installed packages and conventional filesystem locations, and only fail with an actionable message when discovery cannot succeed.This improves first-run usability, CI behavior, editable installs, and package-based environments where CUTLASS may already be installed in a discoverable location. It also reduces setup divergence between users who clone CUTLASS manually and users who install NVIDIA's
nvidia-cutlasspackage.DeepSpeed should already have had this because EvoformerAttention is part of DeepSpeed's extension-builder system, and extension builders should locate common build dependencies using predictable heuristics instead of requiring users to export paths manually. CUDA itself is not treated as "you must always set CUDA_HOME"; PyTorch attempts discovery first and uses the env var as a fallback. CUTLASS should follow the same principle here.