mirror of
https://github.com/BillyOutlast/flash-attention-prebuild-wheels-rocm.git
synced 2026-07-01 01:37:53 -04:00
Merge pull request #80 from mjun0812/copilot/add-coverage-calculation-file
Centralize coverage matrix definitions for full-platform stats
This commit is contained in:
@@ -25,49 +25,23 @@ from rich.table import Table
|
|||||||
from rich.text import Text
|
from rich.text import Text
|
||||||
|
|
||||||
from common import parse_wheel_filename
|
from common import parse_wheel_filename
|
||||||
from create_matrix import (
|
from coverage_matrix import LINUX_ARM64_MATRIX, LINUX_MATRIX, WINDOWS_MATRIX
|
||||||
EXCLUDE,
|
from create_matrix import EXCLUDE
|
||||||
LINUX_ARM64_MATRIX,
|
|
||||||
LINUX_ARM64_SELF_HOSTED_MATRIX,
|
|
||||||
LINUX_MATRIX,
|
|
||||||
LINUX_SELF_HOSTED_MATRIX,
|
|
||||||
WINDOWS_CODEBUILD_MATRIX,
|
|
||||||
WINDOWS_MATRIX,
|
|
||||||
WINDOWS_SELF_HOSTED_MATRIX,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Comprehensive matrix combining all platform-specific matrices
|
# Comprehensive matrix combining all platform-specific matrices
|
||||||
def get_comprehensive_matrix(platform: str) -> dict:
|
def get_comprehensive_matrix(platform: str) -> dict:
|
||||||
"""Get comprehensive matrix for a platform by merging all related matrices."""
|
"""Get comprehensive matrix for a platform."""
|
||||||
if platform == "linux":
|
if platform == "linux":
|
||||||
# Merge LINUX_MATRIX and LINUX_SELF_HOSTED_MATRIX
|
return LINUX_MATRIX
|
||||||
return merge_matrices([LINUX_MATRIX, LINUX_SELF_HOSTED_MATRIX])
|
|
||||||
elif platform == "linux_arm64":
|
elif platform == "linux_arm64":
|
||||||
return merge_matrices([LINUX_ARM64_MATRIX, LINUX_ARM64_SELF_HOSTED_MATRIX])
|
return LINUX_ARM64_MATRIX
|
||||||
elif platform == "windows":
|
elif platform == "windows":
|
||||||
return merge_matrices(
|
return WINDOWS_MATRIX
|
||||||
[WINDOWS_MATRIX, WINDOWS_SELF_HOSTED_MATRIX, WINDOWS_CODEBUILD_MATRIX]
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
def merge_matrices(matrices: list[dict]) -> dict:
|
|
||||||
"""Merge multiple matrices by combining their version lists."""
|
|
||||||
merged = {
|
|
||||||
"flash-attn-version": set(),
|
|
||||||
"python-version": set(),
|
|
||||||
"torch-version": set(),
|
|
||||||
"cuda-version": set(),
|
|
||||||
}
|
|
||||||
for matrix in matrices:
|
|
||||||
for key in merged:
|
|
||||||
merged[key].update(matrix.get(key, []))
|
|
||||||
# Convert sets to sorted lists
|
|
||||||
return {key: sorted(vals, key=parse_version_tuple) for key, vals in merged.items()}
|
|
||||||
|
|
||||||
|
|
||||||
def parse_version_tuple(version: str) -> tuple:
|
def parse_version_tuple(version: str) -> tuple:
|
||||||
"""Parse version string to tuple for sorting."""
|
"""Parse version string to tuple for sorting."""
|
||||||
parts = version.replace("post", ".").split(".")
|
parts = version.replace("post", ".").split(".")
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
"""Coverage matrix definitions for wheel availability checks."""
|
||||||
|
|
||||||
|
LINUX_MATRIX = {
|
||||||
|
"flash-attn-version": [
|
||||||
|
"2.6.3",
|
||||||
|
"2.7.4",
|
||||||
|
"2.8.3",
|
||||||
|
],
|
||||||
|
"python-version": [
|
||||||
|
"3.10",
|
||||||
|
"3.11",
|
||||||
|
"3.12",
|
||||||
|
"3.13",
|
||||||
|
"3.14",
|
||||||
|
],
|
||||||
|
"torch-version": [
|
||||||
|
"2.5.1",
|
||||||
|
"2.6.0",
|
||||||
|
"2.7.1",
|
||||||
|
"2.8.0",
|
||||||
|
"2.9.1",
|
||||||
|
"2.10.0",
|
||||||
|
],
|
||||||
|
"cuda-version": [
|
||||||
|
"12.4",
|
||||||
|
"12.6",
|
||||||
|
"12.8",
|
||||||
|
"13.0",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
LINUX_ARM64_MATRIX = {
|
||||||
|
"flash-attn-version": [
|
||||||
|
"2.8.3",
|
||||||
|
],
|
||||||
|
"python-version": [
|
||||||
|
"3.10",
|
||||||
|
"3.11",
|
||||||
|
"3.12",
|
||||||
|
"3.13",
|
||||||
|
"3.14",
|
||||||
|
],
|
||||||
|
"torch-version": [
|
||||||
|
"2.9.1",
|
||||||
|
"2.10.0",
|
||||||
|
],
|
||||||
|
"cuda-version": [
|
||||||
|
"12.6",
|
||||||
|
"12.8",
|
||||||
|
"13.0",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
WINDOWS_MATRIX = {
|
||||||
|
"flash-attn-version": [
|
||||||
|
"2.8.3",
|
||||||
|
],
|
||||||
|
"python-version": [
|
||||||
|
"3.10",
|
||||||
|
"3.11",
|
||||||
|
"3.12",
|
||||||
|
"3.13",
|
||||||
|
"3.14",
|
||||||
|
],
|
||||||
|
"torch-version": [
|
||||||
|
"2.9.1",
|
||||||
|
"2.10.0",
|
||||||
|
],
|
||||||
|
"cuda-version": [
|
||||||
|
"12.6",
|
||||||
|
"12.8",
|
||||||
|
"13.0",
|
||||||
|
],
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user