diff --git a/custom_backend.py b/custom_backend.py index b95f70043..3d5ca502b 100644 --- a/custom_backend.py +++ b/custom_backend.py @@ -29,8 +29,11 @@ def build_editable(wheel_directory, config_settings=None, metadata_directory=Non def ln(src: str, dst: str) -> None: src: Path = root / src dst: Path = data_dir / dst - if dst.exists() and dst.is_symlink(): - dst.unlink() + if dst.exists(): + if dst.is_symlink(): + dst.unlink() + elif dst.is_dir(): + dst.rmdir() dst.symlink_to(src, target_is_directory=True) ln("3rdparty/cutlass", "cutlass") diff --git a/docs/conf.py b/docs/conf.py index 431f57c4e..0310c9076 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,6 @@ import os import sys +from pathlib import Path # import tlcpack_sphinx_addon # Configuration file for the Sphinx documentation builder. @@ -10,16 +11,18 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -sys.path.insert(0, os.path.abspath("..")) +root = Path(__file__).parents[1].resolve() +sys.path.append(str(root)) os.environ["BUILD_DOC"] = "1" -autodoc_mock_imports = ["torch", "triton"] +autodoc_mock_imports = ["torch", "triton", "flashinfer.jit.aot_config"] project = "FlashInfer" author = "FlashInfer Contributors" -copyright = "2023-2024, {}".format(author) +copyright = f"2023-2024, {author}" -version = "0.1.6" -release = "0.1.6" +package_version = (root / "version.txt").read_text().strip() +version = package_version +release = package_version # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/docs/installation.rst b/docs/installation.rst index db5de87e8..248333489 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -174,7 +174,7 @@ You can follow the steps below to install FlashInfer from source code: .. code-block:: bash cd flashinfer - python3 -m build --no-isolation --wheel + python -m build --no-isolation --wheel ls -la dist/ .. tab:: Create wheel for AOT mode @@ -182,7 +182,7 @@ You can follow the steps below to install FlashInfer from source code: .. code-block:: bash cd flashinfer - TORCH_CUDA_ARCH_LIST="7.5 8.0 8.9 9.0a" FLASHINFER_ENABLE_AOT=1 python3 -m build --no-isolation --wheel + TORCH_CUDA_ARCH_LIST="7.5 8.0 8.9 9.0a" FLASHINFER_ENABLE_AOT=1 python -m build --no-isolation --wheel ls -la dist/ C++ API diff --git a/docs/requirements.txt b/docs/requirements.txt index ce29c2a50..9811ed026 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,7 +1,5 @@ -furo == 2024.01.29 -sphinx == 7.2.6 -sphinx-reredirects == 0.1.2 -sphinx-tabs == 3.4.1 -sphinx-toolbox == 3.4.0 -sphinxcontrib-napoleon == 0.7 -sphinxcontrib_httpdomain == 1.8.1 +furo == 2024.8.6 +sphinx == 8.1.3 +sphinx-reredirects == 0.1.5 +sphinx-tabs == 3.4.5 +sphinx-toolbox == 3.8.1