Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(CMAKE_CXX_EXTENSIONS ON)
set(CMAKE_BUILD_TYPE Release)

set(CMAKE_CXX_COMPILER g++)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Ofast -ffast-math -funroll-loops -march=native -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Ofast -ffast-math -funroll-loops -march=x86-64-v2 -std=c++11")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ 疑问 -march=x86-64-v2 对应 SSE4.2/POPCNT/CX16 基准,是保守兼容的选择。

若 kvcache_transfer 的目标部署环境为现代数据中心 CPU(2013 年后的 Haswell 及以上),-march=x86-64-v3(增加 AVX/AVX2/FMA 支持)可获得更好的内存带宽和向量化性能。

请确认选型依据:是以最大兼容性为优先,还是需要更高性能?如无特殊约束,建议在 PR 描述中注明原因。

add_compile_options("-std=c++11")

find_library(IBVERBS_LIBRARY ibverbs)
Expand Down
Loading