Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
goliaro committed Apr 17, 2024
1 parent 744c4ba commit e2ee9aa
Show file tree
Hide file tree
Showing 5 changed files with 236 additions and 91 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ if(NOT BUILD_LEGION_ONLY)
add_subdirectory(inference/spec_infer)
add_subdirectory(inference/incr_decoding)
add_subdirectory(inference/peft)
add_subdirectory(rdelacou/req_rate_benchmark)
endif()


Expand Down
34 changes: 34 additions & 0 deletions inference/peft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,37 @@ target_include_directories(${project_target3} PRIVATE ${CMAKE_SOURCE_DIR}/infere
target_link_libraries(${project_target3} -Wl,--whole-archive flexflow -Wl,--no-whole-archive ${FLEXFLOW_EXT_LIBRARIES})
set(BIN_DEST "bin")
install(TARGETS ${project_target3} DESTINATION ${BIN_DEST})

# Online peft
set(project_target4 req_rate_benchmark)
set(CPU_SRC4
${FLEXFLOW_CPP_DRV_SRC}
req_rate_benchmark.cc
../models/llama.cc
../models/opt.cc
../models/falcon.cc
../models/starcoder.cc
../models/mpt.cc)

if (FF_GPU_BACKEND STREQUAL "cuda" OR FF_GPU_BACKEND STREQUAL "hip_cuda")
cuda_add_executable(${project_target4} ${CPU_SRC4})
if (FF_GPU_BACKEND STREQUAL "hip_cuda")
target_compile_definitions(${project_target4} PRIVATE __HIP_PLATFORM_NVIDIA__)
endif()
elseif(FF_GPU_BACKEND STREQUAL "hip_rocm")
set_source_files_properties(${CPU_SRC4} PROPERTIES LANGUAGE HIP)
hip_add_executable(${project_target4} ${CPU_SRC4})
if (FF_HIP_ARCH STREQUAL "")
message(FATAL_ERROR "FF_HIP_ARCH is empty!")
endif()
set_property(TARGET ${project_target4} PROPERTY HIP_ARCHITECTURES "${FF_HIP_ARCH}")
target_compile_definitions(${project_target4} PRIVATE __HIP_PLATFORM_AMD__)
else()
message(FATAL_ERROR "Compilation of ${project_target4} for ${FF_GPU_BACKEND} backend not yet supported")
endif()

target_include_directories(${project_target4} PRIVATE ${FLEXFLOW_INCLUDE_DIRS} ${CMAKE_INSTALL_INCLUDEDIR})
target_include_directories(${project_target4} PRIVATE ${CMAKE_SOURCE_DIR}/inference)
target_link_libraries(${project_target4} -Wl,--whole-archive flexflow -Wl,--no-whole-archive ${FLEXFLOW_EXT_LIBRARIES})
set(BIN_DEST "bin")
install(TARGETS ${project_target4} DESTINATION ${BIN_DEST})
Loading

0 comments on commit e2ee9aa

Please sign in to comment.