mirror of
https://github.com/BillyOutlast/flash-attention-prebuild-wheels-rocm.git
synced 2026-06-30 22:37:55 -04:00
refactor: rename docs to doc and pages to docs for GitHub Pages
- Rename docs/ to doc/ (contains packages.md, release_history.md, etc.) - Rename pages/ to docs/ (contains search page index.html) - Update all references in README.md, workflows, and Python scripts GitHub Pages only supports / or /docs as the source directory.
This commit is contained in:
@@ -258,8 +258,8 @@ jobs:
|
||||
--assets /tmp/assets.json \
|
||||
--tag "${{ github.ref_name }}" \
|
||||
--repo "${{ github.repository }}" \
|
||||
--output docs/release_history.md
|
||||
python create_packages.py --assets /tmp/assets.json --output docs/packages.md
|
||||
--output doc/release_history.md
|
||||
python create_packages.py --assets /tmp/assets.json --output doc/packages.md
|
||||
|
||||
- name: Commit and push docs updates
|
||||
run: |
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add docs/data/download_history.json docs/data/download_graph.png
|
||||
git add doc/data/download_history.json doc/data/download_graph.png
|
||||
git diff --staged --quiet || git commit -m "chore: update download statistics
|
||||
|
||||
Update download statistics and graph for $(date -u +%Y-%m-%d)"
|
||||
|
||||
@@ -28,7 +28,7 @@ flash_attn-[flash_attn Version]+cu[CUDA Version]torch[PyTorch Version]-cp[Python
|
||||
flash_attn-2.6.3+cu124torch2.5-cp312-cp312-linux_x86_64.whl
|
||||
```
|
||||
|
||||
2. Find the corresponding version of a wheel from the **[Search Page](https://mjunya.com/flash-attention-prebuild-wheels/)**, [Packages](./docs/packages.md) page, or [releases](https://github.com/mjun0812/flash-attention-prebuild-wheels/releases) page.
|
||||
2. Find the corresponding version of a wheel from the **[Search Page](https://mjunya.com/flash-attention-prebuild-wheels/)**, [Packages](./doc/packages.md) page, or [releases](https://github.com/mjun0812/flash-attention-prebuild-wheels/releases) page.
|
||||
|
||||
3. Direct Install or Download and Local Install
|
||||
|
||||
@@ -51,11 +51,11 @@ pip install ./flash_attn-2.6.3+cu124torch2.5-cp312-cp312-linux_x86_64.whl
|
||||
> Since v0.5.0, wheels are built with a local version label indicating the CUDA and PyTorch versions.
|
||||
> Example: `pip list` -> `flash_attn==2.8.3 -> flash_attn==2.8.3+cu130torch2.9`
|
||||
|
||||
See [./docs/packages.md](./docs/packages.md) for the full list of available packages.
|
||||
See [./doc/packages.md](./doc/packages.md) for the full list of available packages.
|
||||
|
||||
## History
|
||||
|
||||
History of this repository is available [here](./docs/release_history.md).
|
||||
History of this repository is available [here](./doc/release_history.md).
|
||||
|
||||
## Citation
|
||||
|
||||
@@ -91,7 +91,7 @@ If you use this repository in your research and find it helpful, please cite thi
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
<img src="./docs/data/download_graph.png" height="400">
|
||||
<img src="./doc/data/download_graph.png" height="400">
|
||||
|
||||
## Original Repository
|
||||
|
||||
|
||||
+9
-9
@@ -1,6 +1,6 @@
|
||||
"""Create and update docs/packages.md from assets.json.
|
||||
"""Create and update doc/packages.md from assets.json.
|
||||
|
||||
This script generates a comprehensive package documentation page (docs/packages.md) from
|
||||
This script generates a comprehensive package documentation page (doc/packages.md) from
|
||||
GitHub release assets. It combines information from both assets.json and any existing
|
||||
packages.md file, creating organized tables grouped by OS and Flash-Attention version.
|
||||
|
||||
@@ -17,11 +17,11 @@ Usage:
|
||||
Arguments:
|
||||
--assets: Path to assets.json file (default: assets.json)
|
||||
Can be obtained via `gh release view --json assets`
|
||||
--output: Output file path (default: docs/packages.md)
|
||||
--output: Output file path (default: doc/packages.md)
|
||||
|
||||
Example:
|
||||
# Basic usage
|
||||
python create_packages.py --assets assets.json --output docs/packages.md
|
||||
python create_packages.py --assets assets.json --output doc/packages.md
|
||||
|
||||
# Using defaults
|
||||
python create_packages.py
|
||||
@@ -56,7 +56,7 @@ ADD_NOTE = """> [!NOTE]
|
||||
|
||||
|
||||
def extract_packages_from_packages_md(packages_md_path: Path) -> list[dict]:
|
||||
"""Extract package information from existing docs/packages.md."""
|
||||
"""Extract package information from existing doc/packages.md."""
|
||||
if not packages_md_path.exists():
|
||||
return []
|
||||
|
||||
@@ -442,7 +442,7 @@ def generate_markdown_table_by_os(df: pd.DataFrame) -> str:
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Create and update docs/packages.md from assets.json"
|
||||
description="Create and update doc/packages.md from assets.json"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--assets",
|
||||
@@ -453,8 +453,8 @@ def main() -> None:
|
||||
parser.add_argument(
|
||||
"--output",
|
||||
type=str,
|
||||
default="docs/packages.md",
|
||||
help="Output file path (default: docs/packages.md)",
|
||||
default="doc/packages.md",
|
||||
help="Output file path (default: doc/packages.md)",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -466,7 +466,7 @@ def main() -> None:
|
||||
if assets_path.exists():
|
||||
assets_packages = extract_packages_from_assets_json(assets_path)
|
||||
|
||||
# Extract packages from existing docs/packages.md
|
||||
# Extract packages from existing doc/packages.md
|
||||
packages_md_packages = extract_packages_from_packages_md(output_path)
|
||||
|
||||
# Combine both lists
|
||||
|
||||
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
@@ -0,0 +1,141 @@
|
||||
# Flash-Attention Wheel 検索ページ 実装計画
|
||||
|
||||
## 概要
|
||||
|
||||
GitHub Releasesで公開されているFlash-Attentionプリビルドwheelを動的に取得し、フィルタリング・検索できるHTMLページをGitHub Pagesで公開する。
|
||||
|
||||
## ブランチ戦略
|
||||
|
||||
- **開発ブランチ**: `feat/add-search-page`(現在のブランチ)
|
||||
- **公開**: mainブランチの`pages/`ディレクトリをGitHub Pagesとして公開
|
||||
- **GitHub Actions**: 不要(リポジトリ設定でpagesディレクトリを指定)
|
||||
|
||||
## ファイル構成
|
||||
|
||||
```
|
||||
pages/
|
||||
└── index.html # 検索ページ(HTML/CSS/JS全て含む単一ファイル)
|
||||
```
|
||||
|
||||
シンプルに単一HTMLファイルで完結させる(CSS/JSはインライン)。
|
||||
|
||||
## 主な機能
|
||||
|
||||
### 1. フィルタリング機能(ドロップダウン)
|
||||
- Flash-Attention バージョン
|
||||
- Python バージョン
|
||||
- PyTorch バージョン
|
||||
- CUDA バージョン
|
||||
- プラットフォーム (OS)
|
||||
|
||||
### 2. 結果表示
|
||||
- フィルタ条件に合うwheelをテーブル表示
|
||||
- 各行にダウンロードリンク
|
||||
- リリースタグ表示
|
||||
|
||||
### 3. インストールコマンド生成
|
||||
- 行クリックで `pip install <URL>` コマンド表示
|
||||
- コピーボタン(2種類)
|
||||
- **Install Command**: `pip install <URL>` をコピー
|
||||
- **URL Only**: URLのみをコピー
|
||||
|
||||
### 4. URLパラメータ対応
|
||||
- フィルタ状態をURLに保存(共有可能)
|
||||
|
||||
## 技術詳細
|
||||
|
||||
### GitHub API使用
|
||||
- エンドポイント: `GET /repos/mjun0812/flash-attention-prebuild-wheels/releases`
|
||||
- ページネーション対応(100件/ページ)
|
||||
- レート制限: 60回/時間(認証なし)
|
||||
|
||||
### レート制限対策
|
||||
- LocalStorageでキャッシュ(1時間有効)
|
||||
- 初回ロード時のみAPIコール
|
||||
|
||||
### Wheel名パース(common.pyから移植)
|
||||
```javascript
|
||||
const WHEEL_PATTERN = /flash_attn-(\d+\.\d+\.\d+(?:\.[a-z0-9]+)?)\+cu(\d+)torch(\d+\.\d+)-cp(\d+)-cp\d+-(.+?)\.whl/;
|
||||
```
|
||||
|
||||
## 実装ステップ
|
||||
|
||||
### Step 1: 基本構造
|
||||
- [ ] `pages/index.html` 作成(HTML/CSS/JS全て含む単一ファイル)
|
||||
|
||||
### Step 2: 機能実装
|
||||
- [ ] GitHub API からリリース取得
|
||||
- [ ] wheelファイル名のパース
|
||||
- [ ] フィルタリングロジック
|
||||
- [ ] テーブル描画
|
||||
|
||||
### Step 3: UX改善
|
||||
- [ ] ローディング表示
|
||||
- [ ] エラーハンドリング
|
||||
- [ ] インストールコマンド生成(pip install コピー)
|
||||
- [ ] URLのみコピー機能
|
||||
- [ ] URLパラメータ対応
|
||||
|
||||
### Step 4: 最適化
|
||||
- [ ] LocalStorageキャッシュ
|
||||
- [ ] 重複排除(同一組み合わせは最新のみ)
|
||||
|
||||
## 対象ファイル
|
||||
|
||||
| ファイル | 操作 |
|
||||
|---------|------|
|
||||
| `pages/index.html` | 新規作成 |
|
||||
|
||||
## GitHub Pages 設定
|
||||
|
||||
リポジトリ設定で手動で設定:
|
||||
1. Settings > Pages
|
||||
2. Source: Deploy from a branch
|
||||
3. Branch: `main`
|
||||
4. Folder: `/pages`
|
||||
|
||||
## 検証方法
|
||||
|
||||
1. ローカルでHTTPサーバー起動
|
||||
```bash
|
||||
cd pages && python -m http.server 8000
|
||||
```
|
||||
|
||||
2. ブラウザで `http://localhost:8000` にアクセス
|
||||
|
||||
3. 確認項目:
|
||||
- フィルタが正しく動作する
|
||||
- ダウンロードリンクが有効
|
||||
- Install Commandコピーが動作する
|
||||
- URLコピーが動作する
|
||||
- レスポンシブデザインが機能
|
||||
- APIエラー時にエラーメッセージ表示
|
||||
|
||||
4. mainブランチへマージ後、GitHub Pages設定を確認
|
||||
|
||||
## UI イメージ
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Flash-Attention Prebuild Wheels │
|
||||
│ Search and download prebuilt wheels │
|
||||
├─────────────────────────────────────────────────────────────┤
|
||||
│ Flash-Attention ▼ │ Python ▼ │ PyTorch ▼ │ CUDA ▼ │ OS ▼ │
|
||||
│ [All Versions ] │ [All ] │ [All ] │ [All ] │ [All ] │
|
||||
│ [Reset Filters]│
|
||||
├─────────────────────────────────────────────────────────────┤
|
||||
│ 150 wheel(s) found │
|
||||
├─────────────────────────────────────────────────────────────┤
|
||||
│ Flash-Attn │ Python │ PyTorch │ CUDA │ Platform │ DL │
|
||||
├────────────┼────────┼─────────┼───────┼───────────────┼────┤
|
||||
│ 2.8.3 │ 3.11 │ 2.5 │ 12.4 │ Linux x86_64 │ ⬇ │
|
||||
│ 2.8.3 │ 3.10 │ 2.5 │ 12.4 │ Linux x86_64 │ ⬇ │
|
||||
│ ... │ ... │ ... │ ... │ ... │ ...│
|
||||
├─────────────────────────────────────────────────────────────┤
|
||||
│ Install Command │
|
||||
│ ┌─────────────────────────────────────────────────────────┐ │
|
||||
│ │ pip install https://github.com/.../flash_attn-2.8.3... │ │
|
||||
│ └─────────────────────────────────────────────────────────┘ │
|
||||
│ [Copy Command] [Copy URL] │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
@@ -165,8 +165,8 @@ def main():
|
||||
"""Main function to update download statistics and generate graph."""
|
||||
owner = "mjun0812"
|
||||
repo = "flash-attention-prebuild-wheels"
|
||||
history_file = Path("docs/data/download_history.json")
|
||||
graph_output = Path("docs/data/download_graph.png")
|
||||
history_file = Path("doc/data/download_history.json")
|
||||
graph_output = Path("doc/data/download_graph.png")
|
||||
|
||||
# Fetch current stats
|
||||
print("Fetching download statistics from GitHub API...")
|
||||
|
||||
Reference in New Issue
Block a user