Skip to content
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

Skip binaries in the docs build script #904

Merged
merged 6 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@

### Improvements

* Skip the compilation of Lightning simulators and development requirements to boost the build of public docs up to 5x.
[(#904)](https://github.com/PennyLaneAI/pennylane-lightning/pull/904)

* Update Pybind11 to 2.13.5.
[(#901)](https://github.com/PennyLaneAI/pennylane-lightning/pull/901)

Expand Down
25 changes: 5 additions & 20 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,17 @@ version: 2
sphinx:
configuration: doc/conf.py

python:
install:
- requirements: ci_build_requirements.txt
- requirements: doc/requirements.txt
- requirements: requirements-dev.txt
- method: pip
path: .

build:
os: ubuntu-22.04
tools:
python: "3.10"
apt_packages:
- cmake
- build-essential
- libopenblas-base
- libopenblas-dev
- graphviz
- wget
jobs:
pre_install:
- wget https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run
- sh cuda_12.3.2_545.23.08_linux.run --silent --toolkit --toolkitpath=${READTHEDOCS_VIRTUALENV_PATH}/cuda-12.3 || cat /tmp/cuda-installer.log
- echo "setuptools~=66.0" >> ci_build_requirements.txt
post_install:
- rm -rf ./build && export PATH=${READTHEDOCS_VIRTUALENV_PATH}/cuda-12.3/bin${PATH:+:${PATH}} && export LD_LIBRARY_PATH=${READTHEDOCS_VIRTUALENV_PATH}/cuda-12.3/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} && PL_BACKEND="lightning_gpu" python scripts/configure_pyproject_toml.py && CMAKE_ARGS="-DPL_DISABLE_CUDA_SAFETY=1" python -m build
- rm -rf ./build && PL_BACKEND="lightning_kokkos" python scripts/configure_pyproject_toml.py && python -m build
- rm -rf ./build && export PATH=${READTHEDOCS_VIRTUALENV_PATH}/cuda-12.3/bin${PATH:+:${PATH}} && export LD_LIBRARY_PATH=${READTHEDOCS_VIRTUALENV_PATH}/cuda-12.3/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} && PL_BACKEND="lightning_tensor" python scripts/configure_pyproject_toml.py && CMAKE_ARGS="-DPL_DISABLE_CUDA_SAFETY=1" python -m build
- python -m pip install --exists-action=w --no-cache-dir -r doc/requirements.txt
- PL_BACKEND="lightning_qubit" python scripts/configure_pyproject_toml.py && SKIP_COMPILATION=True python -m build
- rm -rf ./build && PL_BACKEND="lightning_gpu" python scripts/configure_pyproject_toml.py && SKIP_COMPILATION=True python -m build
- rm -rf ./build && PL_BACKEND="lightning_kokkos" python scripts/configure_pyproject_toml.py && SKIP_COMPILATION=True python -m build
- rm -rf ./build && PL_BACKEND="lightning_tensor" python scripts/configure_pyproject_toml.py && SKIP_COMPILATION=True python -m build
maliasadi marked this conversation as resolved.
Show resolved Hide resolved
- python -m pip install ./dist/*.whl
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ clean:
rm -rf pennylane_lightning/*_ops*
rm -rf *.egg-info

.PHONY: python
.PHONY: python python-skip-compile
python:
PL_BACKEND=$(PL_BACKEND) python scripts/configure_pyproject_toml.py
pip install -e . --config-settings editable_mode=compat -vv

python-skip-compile:
PL_BACKEND=$(PL_BACKEND) python scripts/configure_pyproject_toml.py
SKIP_COMPILATION=True pip install -e . --config-settings editable_mode=compat -vv

.PHONY: wheel
wheel:
PL_BACKEND=$(PL_BACKEND) python scripts/configure_pyproject_toml.py
Expand Down
3 changes: 3 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath(""))
sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath("_ext"))
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath("doc")), "doc"))

Expand Down Expand Up @@ -189,6 +190,8 @@ def __getattr__(cls, name):
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

nbsphinx_execute = "never"

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
show_authors = True
Expand Down
2 changes: 2 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
tomlkit
build
breathe
docutils==0.16
exhale>=0.3.3
Expand Down
Loading