-
Notifications
You must be signed in to change notification settings - Fork 12
fix: fix quick start link and examples #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f949039
99fb4a5
fdddcc2
6ca7bd8
e383f83
4965e9c
3540351
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,10 @@ MANIFEST | |
| !web/**/lib/ | ||
| !web/**/lib/** | ||
|
|
||
| # Sphinx | ||
| .sphinx-deps | ||
| web/**/public | ||
|
|
||
| .claude | ||
| .vscode | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| import os | ||
| import sys | ||
| from datetime import datetime | ||
| from pathlib import Path | ||
| from typing import Any, List | ||
|
|
||
| import tomli | ||
|
|
||
| # import tlcpack_sphinx_addon | ||
| # Configuration file for the Sphinx documentation builder. | ||
| # | ||
| # For the full list of built-in configuration values, see the documentation: | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
|
||
| # -- Project information ----------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
|
||
| repo_root = Path(__file__).resolve().parents[2] | ||
| sys.path.insert(0, str(repo_root)) | ||
| os.environ["BUILD_DOC"] = "1" | ||
|
|
||
| project = "FlashInfer-Bench" | ||
| author = "FlashInfer Community" | ||
| copyright = f"{datetime.now().year}, {author}" | ||
|
|
||
| try: | ||
| from setuptools_scm import get_version as scm_get_version | ||
| except Exception: | ||
| scm_get_version = None | ||
|
|
||
|
|
||
| def _compute_version() -> str: | ||
| v = os.environ.get("FLASHINFER_BENCH_VERSION") | ||
| if v: | ||
| return v | ||
| if scm_get_version is not None: | ||
| try: | ||
| return scm_get_version(root=str(repo_root), fallback_version="0.0.0") | ||
| except Exception: | ||
| pass | ||
| try: | ||
| with open(repo_root / "pyproject.toml", "rb") as f: | ||
| data = tomli.load(f) | ||
| v = data.get("project", {}).get("version") | ||
| if v: | ||
| return v | ||
| except Exception: | ||
| pass | ||
| return "0.0.0+docs" | ||
|
|
||
|
|
||
| __version__ = _compute_version() | ||
|
|
||
|
|
||
| # -- General configuration --------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
|
||
| extensions = [ | ||
| "myst_parser", | ||
| "sphinx_tabs.tabs", | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.napoleon", | ||
| "sphinx.ext.autosummary", | ||
| "sphinx.ext.mathjax", | ||
| "sphinxcontrib.autodoc_pydantic", | ||
| ] | ||
|
|
||
| autodoc_mock_imports = [ | ||
| "torch", | ||
| "triton", | ||
| "flashinfer._build_meta", | ||
| "cuda", | ||
| "numpy", | ||
| "einops", | ||
| "mpi4py", | ||
| "safetensors", | ||
| ] | ||
| autodoc_default_flags = ["members"] | ||
| autodoc_class_signature = "separated" | ||
| autodoc_member_order = "bysource" | ||
| autodoc_default_options = {"exclude-members": "model_config"} | ||
| autodoc_typehints = "both" | ||
|
|
||
| autodoc_pydantic_model_show_validator_summary = False | ||
| autodoc_pydantic_model_show_validator_members = False | ||
| autodoc_pydantic_model_show_config_summary = False | ||
| autodoc_pydantic_field_list_validators = False | ||
| autodoc_pydantic_model_summary_list_order = "bysource" | ||
| autodoc_pydantic_model_member_order = "bysource" | ||
|
|
||
| autosummary_generate = True | ||
|
|
||
| source_suffix = [".rst", ".md"] | ||
|
|
||
| language = "en" | ||
|
|
||
| exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".sphinx-deps", ".sphinx-deps/**"] | ||
|
|
||
| # The name of the Pygments (syntax highlighting) style to use. | ||
| pygments_style = "sphinx" | ||
|
|
||
| # A list of ignored prefixes for module index sorting. | ||
| # If true, `todo` and `todoList` produce output, else they produce nothing. | ||
| todo_include_todos = False | ||
|
|
||
| myst_enable_extensions = [ | ||
| "dollarmath", | ||
| "amsmath", | ||
| "deflist", | ||
| "colon_fence", | ||
| "html_image", | ||
| "linkify", | ||
| "substitution", | ||
| ] | ||
|
|
||
| myst_heading_anchors = 3 | ||
| myst_ref_domains = ["std", "py"] | ||
| myst_all_links_external = False | ||
|
|
||
| # -- Options for HTML output ---------------------------------------------- | ||
|
|
||
| html_theme = "shibuya" | ||
|
|
||
| templates_path: List[Any] = ["_templates"] | ||
|
|
||
| html_static_path = ["_static"] | ||
|
|
||
|
|
||
| html_theme_options = { | ||
| "accent_color": "indigo", | ||
| "logo_target": "/", | ||
| "light_logo": "_static/brand/fib-light.png", | ||
| "dark_logo": "_static/brand/fib-dark.png", | ||
| "nav_links": [{"title": "Docs", "url": f"/docs", "external": True}], | ||
| "globaltoc_expand_depth": 1, | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # FlashInfer-Bench Python API | ||
|
|
||
| ```{toctree} | ||
| :maxdepth: 2 | ||
| :caption: API Reference | ||
|
|
||
| rst/apply | ||
| rst/tracing | ||
| rst/schema | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| autodoc_pydantic>=2.1,<3 | ||
| myst-parser[linkify]>=4,<5 | ||
| setuptools-scm>=8 | ||
| shibuya | ||
| sphinx==7.4.* | ||
| sphinx-tabs>=3.4.7 | ||
| sphinx-toolbox | ||
| tomli |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| flashinfer_bench.apply | ||
| ====================== | ||
|
|
||
| .. currentmodule:: flashinfer_bench | ||
|
|
||
| ``flashinfer_bench.apply`` provides a tool that meets two needs: | ||
|
|
||
| 1. **Apply** best-performing one from FlashInfer Trace database to the LLM engine | ||
| 2. **Trace** the kernel in the LLM engine and dump its input as FlashInfer Trace's workload format | ||
|
|
||
| .. autofunction:: apply | ||
|
|
||
| .. autofunction:: enable_apply | ||
|
|
||
| .. autofunction:: disable_apply |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| FlashInfer Trace Schema Python API | ||
| ================================== | ||
|
|
||
| FlashInfer-Bench provides a schema for the FlashInfer Trace database. This document includes | ||
| the Python API for the schema, including | ||
|
|
||
| - The :class:`Definition` class, which defines the kernel specification. | ||
| - The :class:`Solution` class, which defines the kernel solution. | ||
| - The :class:`Trace` class, which defines the kernel execution trace. | ||
| - The :class:`TraceSet` class, which defines a set of kernel execution traces. | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| schema_definition | ||
| schema_solution | ||
| schema_trace | ||
| schema_traceset |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| Definition | ||
| ========== | ||
|
|
||
| .. currentmodule:: flashinfer_bench.data | ||
|
|
||
| .. autopydantic_model:: Definition | ||
|
|
||
| .. autopydantic_model:: AxisConst | ||
|
|
||
| .. autopydantic_model:: AxisVar | ||
|
|
||
| .. autopydantic_model:: TensorSpec | ||
|
|
||
| .. autoclass:: flashinfer_bench.data.definition.DType | ||
| :members: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| Solution | ||
| ======== | ||
|
|
||
| .. currentmodule:: flashinfer_bench.data | ||
|
|
||
| .. autopydantic_model:: Solution | ||
|
|
||
| .. autoclass:: SupportedLanguages | ||
| :members: | ||
|
|
||
| .. autopydantic_model:: SourceFile | ||
|
|
||
| .. autopydantic_model:: BuildSpec |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| Trace | ||
| ===== | ||
|
|
||
| .. currentmodule:: flashinfer_bench.data | ||
|
|
||
| .. autopydantic_model:: Trace | ||
|
|
||
| .. autopydantic_model:: RandomInput | ||
|
|
||
| .. autopydantic_model:: ScalarInput | ||
|
|
||
| .. autopydantic_model:: SafetensorsInput | ||
|
|
||
| .. autodata:: InputSpec | ||
|
|
||
| Union type representing all possible input specification types. | ||
|
|
||
| .. autopydantic_model:: Workload | ||
|
|
||
| .. autopydantic_model:: Correctness | ||
|
|
||
| .. autopydantic_model:: Performance | ||
|
|
||
| .. autopydantic_model:: Environment | ||
|
|
||
| .. autoclass:: EvaluationStatus | ||
| :members: | ||
|
|
||
| .. autopydantic_model:: Evaluation |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| TraceSet | ||
| ======== | ||
|
|
||
| .. currentmodule:: flashinfer_bench.data | ||
|
|
||
| .. autoclass:: TraceSet | ||
| :members: | ||
| :exclude-members: __init__ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| flashinfer_bench.tracing | ||
| ======================== | ||
|
|
||
| ``flashinfer_bench.tracing`` provides tools for tracing kernel executions during LLM inference | ||
| and collecting workload traces for the FlashInfer Trace database. This module enables: | ||
|
|
||
| 1. **Workload Collection**: Capture kernel inputs and execution patterns during runtime | ||
| 2. **Configurable Tracing**: Control what data to collect and how to deduplicate or filter traces | ||
| 3. **Filter Policies**: Apply policies to reduce redundant traces and manage dataset size | ||
|
|
||
| .. currentmodule:: flashinfer_bench | ||
|
|
||
| .. autofunction:: enable_tracing | ||
|
|
||
| .. autofunction:: disable_tracing |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,8 +20,8 @@ Useful links: | |
|
|
||
| ## Next Steps | ||
|
|
||
| - Get Started: ./start/quick_start | ||
| - Get Started: ./start/quickstart | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainVerify the updated Get Started path exists and is accessible. The path was updated from Run the following script to check for any remaining references to the old path in the codebase: 🏁 Script executed: #!/bin/bash
# Description: Search for references to the old "quick_start" path in documentation and code.
# Search for old path pattern
rg -n 'quick_start|quick-start' --type md --type mdx --type ts --type js --type jsonLength of output: 27 🏁 Script executed: #!/bin/bash
# Description: Search for references to old "quick_start" path in docs and code (corrected).
# Search for old path pattern - omit mdx type since it's not recognized
echo "=== Searching for old 'quick_start' references ==="
rg -n 'quick_start' --type md --type ts --type js --type json 2>/dev/null || echo "No matches found"
echo ""
echo "=== Searching for old 'flashinfer_trace' path references ==="
rg -n 'flashinfer_trace' --type md --type ts --type js --type json 2>/dev/null || echo "No matches found"
echo ""
echo "=== Checking if new quickstart documentation file exists ==="
fd -t f 'quickstart' docs/ 2>/dev/null || echo "No matching files found"
echo ""
echo "=== Checking if new flashinfer-trace file exists ==="
fd -t f 'flashinfer-trace' docs/ 2>/dev/null || echo "No matching files found"
echo ""
echo "=== Listing docs directory structure ==="
fd -t f . docs/ | head -20Length of output: 445 🏁 Script executed: #!/bin/bash
# Description: Explore repository structure to locate documentation and verify paths.
echo "=== Repository root contents ==="
ls -la | head -20
echo ""
echo "=== Search for all mdx files ==="
find . -name "*.mdx" -type f 2>/dev/null | head -20
echo ""
echo "=== Search for index documentation file ==="
find . -name "index.*" -path "*/docs/*" -type f 2>/dev/null | head -20
echo ""
echo "=== Search for 'start' directory ==="
find . -type d -name "start" 2>/dev/null
echo ""
echo "=== Search for quickstart or quick-start references ==="
find . -name "*quickstart*" -o -name "*quick-start*" 2>/dev/null | head -20
echo ""
echo "=== Search for all documentation-related files ==="
find . -path "*/docs/*" -type f 2>/dev/null | head -30Length of output: 2373 🏁 Script executed: #!/bin/bash
# Description: Inspect the actual content of docs/index.mdx to verify the path changes.
echo "=== Content of docs/index.mdx around lines 20-30 ==="
cat -n docs/index.mdx | sed -n '15,30p'
echo ""
echo "=== Full content of docs/index.mdx ==="
cat docs/index.mdx
echo ""
echo "=== Verify actual files in docs/start/ ==="
ls -la docs/start/
echo ""
echo "=== Verify actual directories in docs/ ==="
ls -la docs/ | grep "^d"Length of output: 2613 The updated paths reference non-existent files and directories, creating broken links. The changes to
However, the actual files and directories still use the old names:
Either rename the files and directories to match the new paths, or revert the index.mdx changes to point to the existing paths. 🤖 Prompt for AI Agents |
||
| - Installation: ./start/installation | ||
| - Schema (FlashInfer Trace): ./flashinfer_trace/flashinfer_trace | ||
| - Schema (FlashInfer Trace): ./flashinfer-trace | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainVerify the updated FlashInfer Trace schema path exists and is accessible. The path was updated from Run the following script to check for any remaining references to the old path in the codebase: 🏁 Script executed: #!/bin/bash
# Description: Search for references to the old "flashinfer_trace/flashinfer_trace" path.
# Search for old path pattern
rg -n 'flashinfer_trace/flashinfer_trace|flashinfer_trace' --type md --type mdx --type ts --type js --type json | head -20Length of output: 27 I'll generate corrected scripts to verify the path update without the unrecognized file type: 🏁 Script executed: #!/bin/bash
# Search for references to old flashinfer_trace path in markdown and code files
echo "=== Searching for old path references ==="
rg -n 'flashinfer_trace/flashinfer_trace' -g '*.md' -g '*.mdx' -g '*.ts' -g '*.js' -g '*.json'
echo ""
echo "=== Searching for standalone flashinfer_trace directory references ==="
rg -n 'flashinfer_trace' -g '*.md' -g '*.mdx' --no-heading -C 2 | head -30
echo ""
echo "=== Checking if new path exists ==="
fd -t d 'flashinfer-trace' || echo "No directory found with pattern flashinfer-trace"
echo ""
echo "=== Looking for new path reference in docs ==="
rg -n 'flashinfer-trace' -g '*.md' -g '*.mdx' -C 2Length of output: 5020 🏁 Script executed: #!/bin/bash
# Search for actual schema documentation files
echo "=== Looking for schema documentation files ==="
fd -e md -e mdx | grep -E '(schema|flashinfer)'
echo ""
echo "=== Checking for flashinfer-trace directory or file ==="
fd 'flashinfer.*trace' -t f -t d
echo ""
echo "=== Listing docs directory structure ==="
find docs -type f -name '*.mdx' -o -name '*.md' | sortLength of output: 1043 🏁 Script executed: #!/bin/bash
# Verify the exact index content and path mismatch
echo "=== Current docs/index.mdx lines 23-27 ==="
sed -n '23,27p' docs/index.mdx
echo ""
echo "=== Verify actual directory exists with underscores ==="
ls -la docs/flashinfer_trace/ | head -10
echo ""
echo "=== Check if hyphenated directory exists ==="
ls -la docs/flashinfer-trace/ 2>&1 || echo "Directory does not exist (as expected)"Length of output: 822 Update the path from The updated path uses hyphens ( 🤖 Prompt for AI Agents |
||
| - Tutorials: ./tutorials/bring_your_own_kernel | ||
| - API Reference: ./api/reference | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link to the quick start guide has been changed to use
quickstart, but the corresponding documentation file provided in the context is namedquick_start.mdx. This inconsistency might lead to a broken link. If the URL path is derived from the filename, it should probably keep the underscore to match.