From dcdd692f310bfa46024112e36ed370455048b12b Mon Sep 17 00:00:00 2001 From: Isotr0py <2037008807@qq.com> Date: Fri, 13 Sep 2024 22:48:42 +0800 Subject: [PATCH 1/2] add oneDNN installation to CPU backend documentation --- docs/source/getting_started/cpu-installation.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/source/getting_started/cpu-installation.rst b/docs/source/getting_started/cpu-installation.rst index 7fc469e06844f..4416790ca9185 100644 --- a/docs/source/getting_started/cpu-installation.rst +++ b/docs/source/getting_started/cpu-installation.rst @@ -51,7 +51,21 @@ Build from source $ sudo apt-get install -y gcc-12 g++-12 libnuma-dev $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 --slave /usr/bin/g++ g++ /usr/bin/g++-12 -- Second, install Python packages for vLLM CPU backend building: +- Second, build and install oneDNN library from source: + +.. code-block:: console + + $ git clone -b rls-v3.5 https://github.com/oneapi-src/oneDNN.git + $ cmake -B ./oneDNN/build -S ./oneDNN -G Ninja -DONEDNN_LIBRARY_TYPE=STATIC \ + -DONEDNN_BUILD_DOC=OFF \ + -DONEDNN_BUILD_EXAMPLES=OFF \ + -DONEDNN_BUILD_TESTS=OFF \ + -DONEDNN_BUILD_GRAPH=OFF \ + -DONEDNN_ENABLE_WORKLOAD=INFERENCE \ + -DONEDNN_ENABLE_PRIMITIVE=MATMUL + $ cmake --build ./oneDNN/build --target install --config Release + +- Third, install Python packages for vLLM CPU backend building: .. code-block:: console From 563a35255a65f9de245d059177c98f52ce28d454 Mon Sep 17 00:00:00 2001 From: Isotr0py <2037008807@qq.com> Date: Fri, 13 Sep 2024 22:56:37 +0800 Subject: [PATCH 2/2] fix order --- .../getting_started/cpu-installation.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/source/getting_started/cpu-installation.rst b/docs/source/getting_started/cpu-installation.rst index 4416790ca9185..816e0a29ef28b 100644 --- a/docs/source/getting_started/cpu-installation.rst +++ b/docs/source/getting_started/cpu-installation.rst @@ -51,7 +51,15 @@ Build from source $ sudo apt-get install -y gcc-12 g++-12 libnuma-dev $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 --slave /usr/bin/g++ g++ /usr/bin/g++-12 -- Second, build and install oneDNN library from source: +- Second, install Python packages for vLLM CPU backend building: + +.. code-block:: console + + $ pip install --upgrade pip + $ pip install wheel packaging ninja "setuptools>=49.4.0" numpy + $ pip install -v -r requirements-cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu + +- Third, build and install oneDNN library from source: .. code-block:: console @@ -65,14 +73,6 @@ Build from source -DONEDNN_ENABLE_PRIMITIVE=MATMUL $ cmake --build ./oneDNN/build --target install --config Release -- Third, install Python packages for vLLM CPU backend building: - -.. code-block:: console - - $ pip install --upgrade pip - $ pip install wheel packaging ninja "setuptools>=49.4.0" numpy - $ pip install -v -r requirements-cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu - - Finally, build and install vLLM CPU backend: .. code-block:: console