Skip to content

Commit 79e8cd8

Browse files
authored
Update Intel doc (#2378)
1 parent 90815ff commit 79e8cd8

File tree

4 files changed

+35
-25
lines changed

4 files changed

+35
-25
lines changed

.github/workflows/build_main_documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
- name: Combine subpackage documentation
7575
run: |
7676
cd optimum
77-
sudo python docs/combine_docs.py --subpackages nvidia amd intel habana neuron tpu furiosa executorch onnx --version ${{ env.VERSION }}
77+
sudo python docs/combine_docs.py --subpackages nvidia amd habana intel neuron tpu furiosa executorch onnx --version ${{ env.VERSION }}
7878
cd ..
7979
8080
- name: Push to repositories

.github/workflows/build_pr_documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: Combine subpackage documentation
7272
run: |
7373
cd optimum
74-
sudo python docs/combine_docs.py --subpackages nvidia amd intel habana neuron tpu furiosa executorch onnx --version pr_$PR_NUMBER
74+
sudo python docs/combine_docs.py --subpackages nvidia amd habana intel neuron tpu furiosa executorch onnx --version pr_$PR_NUMBER
7575
sudo mv optimum-doc-build ../
7676
cd ..
7777

docs/combine_docs.py

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -106,23 +106,33 @@ def add_subpackage_doc(base_toc: List, subpackage: str):
106106
subpackage (str): subpackage name
107107
"""
108108

109-
section_title = EXTERNAL_DOCUMENTATION[subpackage]
110-
# Update optimum table of contents
111-
base_toc.insert(
112-
SUBPACKAGE_TOC_INSERT_INDEX,
113-
{
114-
"sections": [
115-
{
116-
# Ideally this should directly point at https://huggingface.co/docs/optimum-xxx/index
117-
# Current hacky solution is to have a redirection in _redirects.yml
118-
"local": f"docs/optimum-{subpackage}/index",
119-
"title": f"🤗 Optimum {section_title}",
120-
}
121-
],
122-
"title": TITLE_SECTION.get(section_title, section_title),
123-
"isExpanded": False,
124-
},
125-
)
109+
if subpackage == "habana":
110+
# For optimum-habana, we don't create a new section but add it under Intel
111+
new_section = {
112+
"local": "docs/optimum-habana/index",
113+
"title": "🤗 Optimum For Intel Gaudi",
114+
}
115+
for i, toc_element in enumerate(base_toc):
116+
if toc_element["title"] == "Intel":
117+
base_toc[i]["sections"].append(new_section)
118+
else:
119+
section_title = EXTERNAL_DOCUMENTATION[subpackage]
120+
# Update optimum table of contents
121+
base_toc.insert(
122+
SUBPACKAGE_TOC_INSERT_INDEX,
123+
{
124+
"sections": [
125+
{
126+
# Ideally this should directly point at https://huggingface.co/docs/optimum-xxx/index
127+
# Current hacky solution is to have a redirection in _redirects.yml
128+
"local": f"docs/optimum-{subpackage}/index",
129+
"title": f"🤗 Optimum {section_title}",
130+
}
131+
],
132+
"title": TITLE_SECTION.get(section_title, section_title),
133+
"isExpanded": False,
134+
},
135+
)
126136

127137

128138
def main():

docs/source/index.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ The packages below enable you to get the best of the 🤗 Hugging Face ecosystem
3434
><div class="w-full text-center bg-gradient-to-br from-red-600 to-red-600 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">AMD</div>
3535
<p class="text-gray-700">Enable performance optimizations for <span class="underline" onclick="event.preventDefault(); window.open('https://www.amd.com/en/graphics/instinct-server-accelerators', '_blank');">AMD Instinct GPUs</span> and <span class="underline" onclick="event.preventDefault(); window.open('https://ryzenai.docs.amd.com/en/latest/index.html', '_blank');">AMD Ryzen AI NPUs</span></p>
3636
</a>
37-
<a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="https://huggingface.co/docs/optimum-intel/index"
38-
><div class="w-full text-center bg-gradient-to-br from-blue-400 to-blue-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Intel</div>
39-
<p class="text-gray-700">Optimize your model to speedup inference with <span class="underline" onclick="event.preventDefault(); window.open('https://docs.openvino.ai/latest/index.html', '_blank');">OpenVINO</span> , <span class="underline" onclick="event.preventDefault(); window.open('https://www.intel.com/content/www/us/en/developer/tools/oneapi/neural-compressor.html', '_blank');">Neural Compressor</span> and <span class="underline" onclick="event.preventDefault(); window.open('https://intel.github.io/intel-extension-for-pytorch/index.html', '_blank');">IPEX</span></p>
40-
</a>
4137
<a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="https://huggingface.co/docs/optimum-neuron/index"
4238
><div class="w-full text-center bg-gradient-to-br from-orange-400 to-orange-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">AWS Trainium/Inferentia</div>
4339
<p class="text-gray-700">Accelerate your training and inference workflows with <span class="underline" onclick="event.preventDefault(); window.open('https://aws.amazon.com/machine-learning/trainium/', '_blank');">AWS Trainium</span> and <span class="underline" onclick="event.preventDefault(); window.open('https://aws.amazon.com/machine-learning/inferentia/', '_blank');">AWS Inferentia</span></p>
@@ -46,9 +42,13 @@ The packages below enable you to get the best of the 🤗 Hugging Face ecosystem
4642
><div class="w-full text-center bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Google TPUs</div>
4743
<p class="text-gray-700">Accelerate your training and inference workflows with <span class="underline" onclick="event.preventDefault(); window.open('https://cloud.google.com/tpu', '_blank');">Google TPUs</span></p>
4844
</a>
45+
<a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="https://huggingface.co/docs/optimum-intel/index"
46+
><div class="w-full text-center bg-gradient-to-br from-blue-400 to-blue-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Intel</div>
47+
<p class="text-gray-700">Optimize your model to speedup inference with <span class="underline" onclick="event.preventDefault(); window.open('https://docs.openvino.ai/latest/index.html', '_blank');">OpenVINO</span> , <span class="underline" onclick="event.preventDefault(); window.open('https://www.intel.com/content/www/us/en/developer/tools/oneapi/neural-compressor.html', '_blank');">Neural Compressor</span> and <span class="underline" onclick="event.preventDefault(); window.open('https://intel.github.io/intel-extension-for-pytorch/index.html', '_blank');">IPEX</span></p>
48+
</a>
4949
<a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="https://huggingface.co/docs/optimum-habana/index"
50-
><div class="w-full text-center bg-gradient-to-br from-indigo-400 to-indigo-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Habana</div>
51-
<p class="text-gray-700">Maximize training throughput and efficiency with <span class="underline" onclick="event.preventDefault(); window.open('https://docs.habana.ai/en/latest/Gaudi_Overview/Gaudi_Architecture.html', '_blank');">Habana's Gaudi processor</span></p>
50+
><div class="w-full text-center bg-gradient-to-br from-indigo-400 to-indigo-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Intel Gaudi</div>
51+
<p class="text-gray-700">Maximize training throughput and efficiency with <span class="underline" onclick="event.preventDefault(); window.open('https://docs.habana.ai/en/latest/Gaudi_Overview/Gaudi_Architecture.html', '_blank');">Intel's Gaudi processor</span></p>
5252
</a>
5353
<a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./furiosa/index"
5454
><div class="w-full text-center bg-gradient-to-br from-green-400 to-green-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">FuriosaAI</div>

0 commit comments

Comments
 (0)