feat: implement generation of arm packages note

This commit is contained in:
Junya Morioka
2025-12-05 01:29:24 +09:00
parent 68ae61e4d2
commit a2c1cd565e
2 changed files with 11 additions and 4 deletions
+3 -3
View File
@@ -18,9 +18,7 @@ def parse_wheel_filename(filename: str) -> dict | None:
# Flash Attention wheelのパターンに合わせて正規表現を調整
# PyTorchバージョンはマイナーバージョン1桁の形式も対応 (例: torch2.9)
# post1 のようなバージョンサフィックスにも対応 (例: 2.7.4.post1)
pattern = (
r"flash_attn-(\d+\.\d+\.\d+(?:\.[a-z0-9]+)?)\+cu(\d+)torch(\d+\.\d+)-cp(\d+)-cp\d+-(\w+)\.whl"
)
pattern = r"flash_attn-(\d+\.\d+\.\d+(?:\.[a-z0-9]+)?)\+cu(\d+)torch(\d+\.\d+)-cp(\d+)-cp\d+-(\w+)\.whl"
match = re.match(pattern, filename)
if match:
@@ -54,4 +52,6 @@ def normalize_platform_name(raw: str) -> str:
name = name.replace("Win", "Windows")
if "amd64" in name:
name = name.replace("amd64", "x86_64")
if "aarch64" in name:
name = name.replace("aarch64", "arm64")
return name
+8 -1
View File
@@ -346,7 +346,14 @@ def generate_markdown_table_by_os(df: pd.DataFrame) -> str:
all_sections = []
# Generate Table of Contents
os_names = sorted(df["OS"].unique())
# Custom order: Linux x86_64, Linux arm64, Windows
os_order = ["Linux x86_64", "Linux arm64", "Windows"]
all_os_names = df["OS"].unique()
os_names = [os for os in os_order if os in all_os_names]
# Add any OS not in the predefined order (for flexibility)
for os in sorted(all_os_names):
if os not in os_names:
os_names.append(os)
toc_lines = ["## Table of Contents", ""]
for os_name in os_names:
# Create anchor link (lowercase, replace spaces with hyphens)