diff --git a/.bazelrc b/.bazelrc index 194508b9cf..96cf152223 100644 --- a/.bazelrc +++ b/.bazelrc @@ -250,11 +250,11 @@ build:windows --action_env OpenCV_DIR="c:/opt/opencv" build:windows --repo_env=HERMETIC_PYTHON_VERSION=3.11 build:windows --define=USE_DROGON=1 -build:windows --define=GENAI_USE_BINARY=1 +build:windows --define=GENAI_USE_BINARY=0 # Tests settings ############################################################################################################################ # sometimes failed logs exceed this threshold -test --experimental_ui_max_stdouterr_bytes=104857600 +test --experimental_ui_max_stdouterr_bytes=304857600 # envs below are required to succesfully run binaries in bazel as bazel is very strict in sandboxing test:linux --test_env LD_LIBRARY_PATH=/opt/opencv/lib/:/opt/intel/openvino/runtime/lib/intel64/:/opt/intel/openvino/runtime/3rdparty/tbb/lib/ diff --git a/third_party/llm_engine/llm_engine.bzl b/third_party/llm_engine/llm_engine.bzl index dfb82fef2a..58882037b2 100644 --- a/third_party/llm_engine/llm_engine.bzl +++ b/third_party/llm_engine/llm_engine.bzl @@ -23,8 +23,8 @@ def llm_engine(): llm_engine_repository(name="_llm_engine") new_git_repository( name = "llm_engine", - remote = "https://github.com/openvinotoolkit/openvino.genai", - commit = "3ce470c851aea7c0d9743bcd7d0d401954611a69", # releases/2025/1 2025-03-20 + remote = "https://github.com/mzegla/openvino.genai", + commit = "da1497e2087c7e11af89faab854b412c7594ed63", # based on releases/2025/1, commit with VLM fixes for serving, 2025-03-26 build_file = "@_llm_engine//:BUILD", init_submodules = True, recursive_init_submodules = True, @@ -66,6 +66,7 @@ def _impl(repository_ctx): "WIN32": "True", "X86_64": "True" """ + jobs_param = "\" -j 8\"" # on Windows we do not need to specify number of jobs, it's set to all available cores number else: lib_name = "libopenvino_genai" out_dll_dir_win = "" @@ -79,6 +80,7 @@ def _impl(repository_ctx): "CMAKE_ARCHIVE_OUTPUT_DIRECTORY": "lib", "ENABLE_SYSTEM_ICU": "True", """ + jobs_param = "\"-j 8\"" # on Linux we need to specify jobs number, by default it's set to 1 # Note we need to escape '{/}' by doubling them due to call to format build_file_content = """ @@ -112,7 +114,7 @@ cmake( "--", # <- Pass remaining options to the native tool. # https://github.com/bazelbuild/rules_foreign_cc/issues/329 # there is no elegant parallel compilation support - lets go with default - CORES + 2 for ninja - "-j 8", + {jobs_param} ], cache_entries = {{ {cache_entries} @@ -154,7 +156,8 @@ cc_library( ) """ repository_ctx.file("BUILD", build_file_content.format(OpenVINO_DIR=OpenVINO_DIR, http_proxy=http_proxy, https_proxy=https_proxy, - out_dll_dir_win=out_dll_dir_win, out_lib_dir=out_lib_dir, lib_name=lib_name, out_libs=out_libs, cache_entries=cache_entries, out_static=out_static)) + out_dll_dir_win=out_dll_dir_win, out_lib_dir=out_lib_dir, lib_name=lib_name, out_libs=out_libs, cache_entries=cache_entries, out_static=out_static, + jobs_param=jobs_param)) llm_engine_repository = repository_rule( implementation = _impl, diff --git a/windows_install_build_dependencies.bat b/windows_install_build_dependencies.bat index c7d593d1d5..b3b019a146 100644 --- a/windows_install_build_dependencies.bat +++ b/windows_install_build_dependencies.bat @@ -124,54 +124,65 @@ IF /I EXIST %bash_path% ( ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::: GENAI/OPENVINO - reinstalled per build trigger -set "genai_dir=openvino_genai_windows_2025.1.0.0rc2_x86_64" -set "genai_ver=openvino_genai_windows_2025.1.0.0rc2_x86_64.zip" -set "genai_http=https://storage.openvinotoolkit.org/repositories/openvino_genai/packages/pre-release/2025.1.0.0rc2/" -set "genai_zip=%BAZEL_SHORT_PATH%\%genai_ver%" -set "genai_workspace=C:\\\\opt\\\\openvino\\\\runtime" -set "genai_new_workspace=C:\\%output_user_root%\\openvino\\runtime" +:: For now we build GenAI from source -echo [INFO] Installing GenAI: %genai_dir% ... -:: Download GenAi -IF /I EXIST %genai_zip% ( +::set "genai_dir=openvino_genai_windows_2025.1.0.0rc2_x86_64" +::set "genai_ver=openvino_genai_windows_2025.1.0.0rc2_x86_64.zip" +::set "genai_http=https://storage.openvinotoolkit.org/repositories/openvino_genai/packages/pre-release/2025.1.0.0rc2/" + +::set "genai_zip=%BAZEL_SHORT_PATH%\%genai_ver%" +::set "genai_workspace=C:\\\\opt\\\\openvino\\\\runtime" +::set "genai_new_workspace=C:\\%output_user_root%\\openvino\\runtime" + +set "openvino_dir=openvino_toolkit_windows_2025.1.0.dev20250320_x86_64" +set "openvino_ver=openvino_toolkit_windows_2025.1.0.dev20250320_x86_64.zip" +set "openvino_http=https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2025.1.0rc2/" + +set "openvino_zip=%BAZEL_SHORT_PATH%\%openvino_ver%" +set "openvino_workspace=C:\\\\opt\\\\openvino\\\\runtime" +set "openvino_new_workspace=C:\\%output_user_root%\\openvino\\runtime" + +echo [INFO] Installing OpenVINO: %openvino_dir% ... + :: Download OpenVINO + IF /I EXIST %openvino_zip% ( if %expunge% EQU 1 ( - del /S /Q %genai_zip% + del /S /Q %openvino_zip% if !errorlevel! neq 0 exit /b !errorlevel! - %wget_path% -P %BAZEL_SHORT_PATH%\ %genai_http%%genai_ver% + %wget_path% -P %BAZEL_SHORT_PATH%\ %openvino_http%%openvino_ver% if !errorlevel! neq 0 exit /b !errorlevel! - ) else ( echo [INFO] file exists %genai_zip% ) + ) else ( echo [INFO] file exists %openvino_zip% ) ) ELSE ( - %wget_path% -P %BAZEL_SHORT_PATH%\ %genai_http%%genai_ver% + %wget_path% -P %BAZEL_SHORT_PATH%\ %openvino_http%%openvino_ver% if !errorlevel! neq 0 exit /b !errorlevel! ) -:: Extract GenAi -IF /I EXIST %BAZEL_SHORT_PATH%\%genai_dir% ( +:: Extract OpenVINO +IF /I EXIST %BAZEL_SHORT_PATH%\%openvino_dir% ( if %expunge% EQU 1 ( - rmdir /S /Q %BAZEL_SHORT_PATH%\%genai_dir% + rmdir /S /Q %BAZEL_SHORT_PATH%\%openvino_dir% if !errorlevel! neq 0 exit /b !errorlevel! - C:\Windows\System32\tar.exe -xf "%genai_zip%" -C %BAZEL_SHORT_PATH% + C:\Windows\System32\tar.exe -xf "%openvino_zip%" -C %BAZEL_SHORT_PATH% if !errorlevel! neq 0 exit /b !errorlevel! - ) else ( echo [INFO] directory exists %BAZEL_SHORT_PATH%\%genai_dir% ) + ) else ( echo [INFO] directory exists %BAZEL_SHORT_PATH%\%openvino_dir% ) ) ELSE ( - C:\Windows\System32\tar.exe -xf "%genai_zip%" -C %BAZEL_SHORT_PATH% + C:\Windows\System32\tar.exe -xf "%openvino_zip%" -C %BAZEL_SHORT_PATH% if !errorlevel! neq 0 exit /b !errorlevel! ) -:: Create GenAi link - always to make sure it points to latest version +:: Create OpenVINO link - always to make sure it points to latest version IF /I EXIST %BAZEL_SHORT_PATH%\openvino ( rmdir /S /Q %BAZEL_SHORT_PATH%\openvino ) -mklink /d %BAZEL_SHORT_PATH%\openvino %BAZEL_SHORT_PATH%\%genai_dir% +mklink /d %BAZEL_SHORT_PATH%\openvino %BAZEL_SHORT_PATH%\%openvino_dir% if !errorlevel! neq 0 exit /b !errorlevel! -:: Replace path to GenAi in ovms WORKSPACE file +:: Replace path to OpenVINO in ovms WORKSPACE file if "!output_user_root!" neq "opt" ( - powershell -Command "(gc -Path WORKSPACE) -replace '%genai_workspace%', '%genai_new_workspace%' | Set-Content -Path WORKSPACE" + powershell -Command "(gc -Path WORKSPACE) -replace '%openvino_workspace%', '%openvino_new_workspace%' | Set-Content -Path WORKSPACE" if !errorlevel! neq 0 exit /b !errorlevel! ) -echo [INFO] GenAi installed: %BAZEL_SHORT_PATH%\%genai_dir% +echo [INFO] OpenVINO installed: %BAZEL_SHORT_PATH%\%openvino_dir% ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::: OpenCL headers