mirror of
https://github.com/uxlfoundation/oneDNN.git
synced 2025-10-20 18:43:49 +08:00
doc, build: added version selector for developer guide
This commit is contained in:
@ -64,7 +64,12 @@ option(ONEDNN_ENABLE_GRAPH_DUMP "enables control of dumping graph artifacts via
|
||||
|
||||
set(DNNL_LIBRARY_TYPE "SHARED" CACHE STRING
|
||||
"specifies whether oneDNN library should be SHARED or STATIC")
|
||||
|
||||
option(DNNL_BUILD_DOC "builds documentation" ${DNNL_IS_MAIN_PROJECT})
|
||||
set(ONEDNN_DOC_VERSIONS_JSON "" CACHE STRING "Location of JSON file for
|
||||
PyData Sphinx Theme version switcher. Must be a stable, persistent,
|
||||
fully resolved URL. Enables documentation version switcher when set.")
|
||||
|
||||
option(DNNL_BUILD_EXAMPLES "builds examples" ${DNNL_IS_MAIN_PROJECT})
|
||||
option(DNNL_BUILD_TESTS "builds tests" ${DNNL_IS_MAIN_PROJECT})
|
||||
option(DNNL_BUILD_FOR_CI
|
||||
|
7
doc/build/build_options.md
vendored
7
doc/build/build_options.md
vendored
@ -4,11 +4,12 @@ Use Build Options {#dev_guide_build_options}
|
||||
oneDNN supports the following build-time options.
|
||||
|
||||
| CMake Option | Supported values (defaults in bold) | Description |
|
||||
|:--------------------------------|:----------------------------------------------------|:------------------------------------------------------------------------------------------------|
|
||||
|:--------------------------------|:----------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
|
||||
| ONEDNN_LIBRARY_TYPE | **SHARED**, STATIC | Defines the resulting library type |
|
||||
| ONEDNN_CPU_RUNTIME | NONE, **OMP**, TBB, SEQ, THREADPOOL, SYCL | Defines the threading runtime for CPU engines |
|
||||
| ONEDNN_GPU_RUNTIME | **NONE**, OCL, SYCL | Defines the offload runtime for GPU engines |
|
||||
| ONEDNN_BUILD_DOC | **ON**, OFF | Controls building the documentation |
|
||||
| ONEDNN_DOC_VERSIONS_JSON | **""**, *string* | Location of JSON file for [PyData Sphinx Theme version switcher]. Enables documentation version switcher when set. |
|
||||
| ONEDNN_BUILD_EXAMPLES | **ON**, OFF | Controls building the examples |
|
||||
| ONEDNN_BUILD_TESTS | **ON**, OFF | Controls building the tests |
|
||||
| ONEDNN_BUILD_GRAPH | **ON**, OFF | Controls building graph component |
|
||||
@ -30,11 +31,13 @@ oneDNN supports the following build-time options.
|
||||
| ONEDNN_DEV_MODE | ON, **OFF** | Enables internal tracing and `debuginfo` logging in verbose output (for oneDNN developers) |
|
||||
| ONEDNN_AARCH64_USE_ACL | ON, **OFF** | Enables integration with Arm Compute Library for AArch64 builds |
|
||||
| ONEDNN_BLAS_VENDOR | **NONE**, ARMPL, ACCELERATE | Defines an external BLAS library to link to for GEMM-like operations |
|
||||
| ONEDNN_GPU_VENDOR | NONE, **INTEL**, NVIDIA, AMD | When DNNL_GPU_RUNTIME is not NONE defines GPU vendor for GPU engines otherwise its value is NONE|
|
||||
| ONEDNN_GPU_VENDOR | NONE, **INTEL**, NVIDIA, AMD | When DNNL_GPU_RUNTIME is not NONE defines GPU vendor for GPU engines otherwise its value is NONE |
|
||||
| ONEDNN_DPCPP_HOST_COMPILER | **DEFAULT**, *GNU or Clang C++ compiler executable* | Specifies host compiler executable for SYCL runtime |
|
||||
| ONEDNN_LIBRARY_NAME | **dnnl**, *library name* | Specifies name of the library |
|
||||
| ONEDNN_TEST_SET | SMOKE, **CI**, NIGHTLY, MODIFIER_NAME | Specifies the testing coverage enabled through the generated testing targets |
|
||||
|
||||
[PyData Sphinx Theme version switcher]: https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html
|
||||
|
||||
All building options listed support their counterparts with `DNNL` prefix
|
||||
instead of `ONEDNN`. `DNNL` options would take precedence over `ONEDNN`
|
||||
versions, if both versions are specified.
|
||||
|
@ -154,9 +154,19 @@ html_theme_options = {
|
||||
"use_download_button": True,
|
||||
"path_to_docs": "doc",
|
||||
"use_issues_button": True,
|
||||
"check_switcher": False,
|
||||
"extra_footer": "oneDNN is licensed under Apache License Version 2.0. Refer to the <a href='https://github.com/uxlfoundation/oneDNN/blob/main/LICENSE'>LICENSE</a> file for the full license text and copyright notice."
|
||||
}
|
||||
|
||||
# Adding version switcher if ONEDNN_DOC_VERSIONS_JSON is provided
|
||||
json_url = '@ONEDNN_DOC_VERSIONS_JSON@'
|
||||
if json_url:
|
||||
html_theme_options["switcher"] = {
|
||||
"json_url": json_url,
|
||||
"version_match": version
|
||||
}
|
||||
html_theme_options["article_header_start"] = ["toggle-primary-sidebar", "version-switcher"]
|
||||
|
||||
mathjax3_config = {
|
||||
'tex': {
|
||||
'macros': {
|
||||
|
Reference in New Issue
Block a user