Skip to content

Commit

Permalink
Add -npu switch to compile for Lin Client. This includes disabling of…
Browse files Browse the repository at this point in the history
… Alveo drivers and ERT. (#8568)

Signed-off-by: ishitag <[email protected]>
Co-authored-by: ishitag <[email protected]>
  • Loading branch information
IshitaGhosh and ishitag authored Oct 28, 2024
1 parent 7a79e4b commit 5952bcf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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"
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/CMake/cpackLin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5952bcf

Please sign in to comment.