From 5952bcff5baef5a4b17064d14ba28042a6fb7cc2 Mon Sep 17 00:00:00 2001 From: Ishita Ghosh <43157456+IshitaGhosh@users.noreply.github.com> Date: Mon, 28 Oct 2024 09:37:25 -0700 Subject: [PATCH] Add -npu switch to compile for Lin Client. This includes disabling of Alveo drivers and ERT. (#8568) Signed-off-by: ishitag Co-authored-by: ishitag --- build/build.sh | 7 +++++-- src/CMake/cpackLin.cmake | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build/build.sh b/build/build.sh index 3f50d33e986..cf58fae99c8 100755 --- a/build/build.sh +++ b/build/build.sh @@ -53,12 +53,12 @@ usage() echo "[-opt] Build optimized library only (default)" echo "[-edge] Build edge of x64. Turns off opt and dbg" echo "[-hip] Enable hip bindings" - echo "[-noalveo] Disable bundling of Alveo Linux drivers" echo "[-disable-werror] Disable compilation with warnings as error" echo "[-nocmake] Skip CMake call" echo "[-noert] Do not treat missing ERT FW as a build error" echo "[-noinit] Do not initialize Git submodules" echo "[-noctest] Skip unit tests" + echo "[-npu] Build for NPU only. Disable bundling of Alveo Linux drivers. Do not treat missing ERT FW as a build error. Compile XDP plugins for NPU." echo "[-with-static-boost Build binaries using static linking of boost from specified boost install" echo "[-clangtidy] Run clang-tidy as part of build" echo "[-pskernel] Enable building of POC ps kernel" @@ -156,9 +156,12 @@ while [ $# -gt 0 ]; do shift cmake_flags+=" -DXRT_ENABLE_HIP=ON" ;; - -noalveo) + -npu) shift alveo=0 + noert=1 + cmake_flags+=" -DXDP_CLIENT_BUILD_CMAKE=yes" + cmake_flags+=" -DNPU=1" ;; -opt) dbg=0 diff --git a/src/CMake/cpackLin.cmake b/src/CMake/cpackLin.cmake index 4c234371a06..d3868acb9d8 100644 --- a/src/CMake/cpackLin.cmake +++ b/src/CMake/cpackLin.cmake @@ -19,6 +19,10 @@ SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON) SET(CPACK_DEB_COMPONENT_INSTALL ON) SET(CPACK_RPM_COMPONENT_INSTALL ON) +if (DEFINED NPU) + SET(CPACK_PACKAGE_NAME "npu") +endif() + # When the rpmbuild occurs for packaging, it uses a default version of # python to perform a python byte compilation. For the CentOS 7.x OS, this # is python2. Being that the XRT python code is for python3, this results in