Skip to content

Conversation

@yurekami
Copy link

Summary

This PR improves the build experience by providing clearer error messages and better feedback during compilation.

Build System Improvements

  • Replace cryptic assert with descriptive RuntimeError messages
  • Add actionable guidance when CUDA version is too old for SM100 (Blackwell)
  • Show which GPU architectures (SM90/SM100) are enabled during compilation
  • Add error handling for missing or broken CUDA installations
  • Prevent silent failures when no architectures are enabled

Example: New Error Message for CUDA < 12.9

Before:

AssertionError: sm100 compilation for Flash MLA requires NVCC 12.9 or higher...

After:

RuntimeError: SM100 (Blackwell) compilation requires CUDA 12.9 or higher, but found CUDA 12.4.

Options to fix this:
  1. Upgrade to CUDA 12.9+ to enable SM100 support
  2. Disable SM100 compilation by setting: FLASH_MLA_DISABLE_SM100=1

Example: FLASH_MLA_DISABLE_SM100=1 pip install -v .

Note: SM90 (Hopper) kernels will still be compiled and available.

Python Code Style

  • Use assert not causal instead of assert causal == False (PEP 8 E712)
  • Improve assertion error message clarity

Test plan

  • Verify error messages display correctly with CUDA < 12.9
  • Verify compilation succeeds with FLASH_MLA_DISABLE_SM100=1
  • Verify architecture status is printed during build

Relates to #79

🤖 Generated with Claude Code

Build system improvements:
- Replace cryptic assertion with clear RuntimeError messages
- Add helpful guidance when CUDA version is too old for SM100
- Show which GPU architectures are enabled during compilation
- Add error handling for missing/broken CUDA installations
- Prevent silent failures when no architectures are enabled

Python code style:
- Use `assert not causal` instead of `assert causal == False` (PEP 8)
- Improve assertion error message clarity

These changes help users quickly diagnose and fix build issues,
especially when using older CUDA versions with Hopper GPUs.

Relates to deepseek-ai#79

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant