Skip to content

Commit

Permalink
Add scripts for evaluation with Microsoft Azure trace (#1363)
Browse files Browse the repository at this point in the history
* Add scripts for evaluation

* Add absolute request rate value

* Fix script for target arrival rate

* Fix cpp req rate benchmark

* update to use new dataset

* Fix infinite loop

* update

* add data

---------

Co-authored-by: Remi Delacourt <rdelacou@catalyst-0-9.eth>
Co-authored-by: Gabriele Oliaro <goliaro@cs.cmu.edu>
  • Loading branch information
3 people authored Apr 17, 2024
1 parent b1e97b1 commit e35ebb2
Show file tree
Hide file tree
Showing 5 changed files with 702 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/flexflow/request_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ struct Request {
int dataset_entry_processed_tokens = 0;
int max_training_steps = 1;
int benchmarking_tokens = -1;
std::vector<int>finetuning_tokens_per_batch;
bool warmup = false;
std::string dataset_filepath;
std::vector<std::pair<std::vector<BatchConfig::TokenId>,
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 e35ebb2

Please sign in to comment.