From 907e986ebd7f4de58c9ff54fc6e7b13bcb5c65da Mon Sep 17 00:00:00 2001 From: Zaili Wang <109502517+ZailiWang@users.noreply.github.com> Date: Fri, 15 Dec 2023 09:54:13 +0800 Subject: [PATCH] [runtime/ipex] Add ITN support in ipex path (#2246) * update ITN dependency * upgrade torch version in README.md --- runtime/ipex/CMakeLists.txt | 4 ++++ runtime/ipex/README.md | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/ipex/CMakeLists.txt b/runtime/ipex/CMakeLists.txt index aa22d9587..ea17d9d6b 100644 --- a/runtime/ipex/CMakeLists.txt +++ b/runtime/ipex/CMakeLists.txt @@ -10,6 +10,7 @@ option(GRPC "whether to build with gRPC" OFF) option(WEBSOCKET "whether to build with websocket" OFF) option(HTTP "whether to build with http" OFF) option(TORCH "whether to build with Torch" ON) +option(ITN "whether to use WeTextProcessing" ON) option(IPEX "whether to build with Torch+IPEX" ON) set(CMAKE_VERBOSE_MAKEFILE OFF) @@ -30,6 +31,9 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/kaldi ) +if(ITN) + include(wetextprocessing) +endif() # Build all libraries add_subdirectory(utils) diff --git a/runtime/ipex/README.md b/runtime/ipex/README.md index 6308d6607..a75535120 100644 --- a/runtime/ipex/README.md +++ b/runtime/ipex/README.md @@ -62,9 +62,10 @@ git clone https://github.com/wenet-e2e/wenet cd wenet pip install -r requirements.txt ``` -Installation of IPEX +Upgrading of PyTorch and TorchAudio, followed by the installation of IPEX ``` sh -pip install intel_extension_for_pytorch==2.0.100 -f https://developer.intel.com/ipex-whl-stable-cpu +pip install torch==2.0.1 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cpu --force-reinstall +pip install intel_extension_for_pytorch==2.0.100 ``` Installation of related tools: IntelĀ® OpenMP and TCMalloc