Skip to content

Conversation

@LoserCheems
Copy link
Collaborator

Replaces string-based version comparison with proper semantic version parsing to ensure accurate comparison of PyTorch versions.

Uses packaging.version.parse() instead of direct string comparison to handle edge cases and version formats correctly.

Replaces string-based version comparison with proper semantic version parsing to ensure accurate comparison of PyTorch versions.

Uses packaging.version.parse() instead of direct string comparison to handle edge cases and version formats correctly.
@LoserCheems LoserCheems requested review from Evanwu1125, SNHuan, Copilot and wubingheng111 and removed request for Copilot July 30, 2025 12:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves version comparison by replacing string-based PyTorch version comparison with proper semantic version parsing using the packaging library. This ensures more reliable version comparisons that handle edge cases and different version formats correctly.

  • Replaces direct string comparison of PyTorch versions with packaging.version.parse()
  • Adds import for the packaging.version module
Comments suppressed due to low confidence (1)

flash_dmattn/flash_dmattn_interface.py:4

  • The packaging library may not be available in all environments. Consider adding error handling or ensure packaging is included in the project's dependencies.
from packaging import version

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.

5 participants