Skip to content

Commit

Permalink
Merge branch 'simplify-test-matrix' into demo-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklandsign committed Oct 23, 2023
2 parents c6afb7f + fd96dfc commit 2ac0a2d
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .ci/scripts/gather_test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ def export_models_for_ci() -> dict[str, dict]:
continue

if backend == "xnnpack":
if name in MODEL_NAME_TO_OPTIONS and MODEL_NAME_TO_OPTIONS[name].quantization:
if (
name in MODEL_NAME_TO_OPTIONS
and MODEL_NAME_TO_OPTIONS[name].quantization
):
backend += "-quantization"

if name in MODEL_NAME_TO_OPTIONS and MODEL_NAME_TO_OPTIONS[name].delegation:
Expand Down
2 changes: 1 addition & 1 deletion .ci/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ test_model_with_xnnpack() {
# Quantization-only
if [[ ${WITH_QUANTIZATION} == true ]] && [[ ${WITH_DELEGATION} == false ]]; then
bash examples/xnnpack/quantization/test_quantize.sh "${BUILD_TOOL}" "${MODEL_NAME}"
exit 0
return 0
fi

# Delegation
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ jobs:
export CHANNEL=nightly
fi
# Get the version of ExecuTorch from REF_NAME and save as ET_VERSION_DOCS
# ET_VERSION_DOCS will be pulled during the doc build to add to the version dropdown
# on the website. See docs/source/conf.py for details
REF_TYPE=${{ github.ref_type }}
REF_NAME=${{ github.ref_name }}
echo "$REF_TYPE"
echo "$REF_NAME"
ET_VERSION_DOCS="${REF_NAME}"
echo "$ET_VERSION_DOCS"
set -eux
# Build docset:
Expand Down
36 changes: 36 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,42 @@
)

html_favicon = "_static/img/ExecuTorch-Logo-cropped.svg"

# Get ET_VERSION_DOCS during the build.
et_version_docs = os.environ.get("ET_VERSION_DOCS", None)


# The code below will cut version displayed in the dropdown like this:
# tags like v0.1.0 = > 0.1
# branch like release/0.1 => 0.1
# main will remain main
# if not set will fail back to main
# the version varible is used in layout.html: https://github.com/pytorch/executorch/blob/main/docs/source/_templates/layout.html#L29
if et_version_docs:
# Check if starts with release/ and set the version to the number after slash
if et_version_docs.startswith("release/"):
version = et_version_docs.split("/")[-1]
else:
# Remove "v" prefix if present
if et_version_docs.startswith("v"):
et_version_docs = et_version_docs[1:]
# Split to major, minor, and patch
version_components = et_version_docs.split(".")

# Combine the major and minor version components:
if len(version_components) >= 2:
version = release = ".".join(version_components[:2])
else:
# If there are not enough components, use the full version
version = release = et_version_docs

html_title = " ".join((project, version, "documentation"))
# IF ET_VERSION_DOCS not set, set version to main.
# This can be updated to nightly and so on.
else:
version = "main"
release = "main"

breathe_projects = {"ExecuTorch": "../build/xml/"}
breathe_default_project = "ExecuTorch"

Expand Down

0 comments on commit 2ac0a2d

Please sign in to comment.