Skip to content

Commit

Permalink
Updated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
nvidianz committed Apr 10, 2024
1 parent e803340 commit 3c926f0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
19 changes: 12 additions & 7 deletions integration/xgboost/processor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(proc_nvflare LANGUAGES CXX C VERSION 1.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_BUILD_TYPE Debug)

option(GOOGLE_TEST "Build google tests" OFF)

file(GLOB_RECURSE LIB_SRC
"src/*.h"
"src/*.cc"
Expand All @@ -26,22 +28,25 @@ endif ()
target_link_libraries(proc_nvflare ${XGB_SRC}/lib/libxgboost${CMAKE_SHARED_LIBRARY_SUFFIX})

#-- Unit Tests
find_package(GTest REQUIRED)
enable_testing()
add_executable(proc_test)
target_link_libraries(proc_test PRIVATE proc_nvflare)
if(GOOGLE_TEST)
find_package(GTest REQUIRED)
enable_testing()
add_executable(proc_test)
target_link_libraries(proc_test PRIVATE proc_nvflare)


target_include_directories(proc_test PRIVATE ${proc_nvflare_SOURCE_DIR}/src/include
target_include_directories(proc_test PRIVATE ${proc_nvflare_SOURCE_DIR}/src/include
${XGB_SRC}/src
${XGB_SRC}/rabit/include
${XGB_SRC}/include
${XGB_SRC}/dmlc-core/include
${XGB_SRC}/tests)

add_subdirectory(${proc_nvflare_SOURCE_DIR}/tests)
add_subdirectory(${proc_nvflare_SOURCE_DIR}/tests)

add_test(
add_test(
NAME TestProcessor
COMMAND proc_test
WORKING_DIRECTORY ${proc_nvflare_BINARY_DIR})

endif()
15 changes: 15 additions & 0 deletions integration/xgboost/processor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Build Instruction

This plugin build requires xgboost source code, checkout xgboost source and build it with FEDERATED plugin,

cd xgboost
mkdir build
cd build
cmake .. -DPLUGIN_FEDERATED=ON
make

cd NVFlare/integration/xgboost/processor
mkdir build
cd build
cmake ..
make
1 change: 1 addition & 0 deletions integration/xgboost/processor/src/dam/dam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/
#include <iostream>
#include <cstring>
#include "dam.h"

void print_buffer(uint8_t *buffer, int size) {
Expand Down

0 comments on commit 3c926f0

Please sign in to comment.