Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
[NSE-927] Implement AVX512 optimization selection in Runtime and merg…
Browse files Browse the repository at this point in the history
…e two C2R code files into one. (#937)

* extract and inline functions

* Remove debug info

* Implement AVX512 optimization selection in Runtime.

* Fix Clang-format

* Use aligned AVX

* Add issue comment
  • Loading branch information
zhixingheyi-tian authored Jun 6, 2022
1 parent d2474c8 commit cd2e378
Show file tree
Hide file tree
Showing 6 changed files with 310 additions and 1,172 deletions.
12 changes: 3 additions & 9 deletions native-sql-engine/cpp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ file(COPY codegen/common/hash_relation_number.h DESTINATION ${root_directory}/re

add_definitions(-DNATIVESQL_SRC_PATH="${root_directory}/releases")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations -Wno-attributes")
set(NATIVE_AVX512_FLAG "-march=icelake-server")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NATIVE_AVX512_FLAG}")
set(SPARK_COLUMNAR_PLUGIN_SRCS
jni/jni_wrapper.cc
${PROTO_SRCS}
Expand All @@ -520,6 +522,7 @@ set(SPARK_COLUMNAR_PLUGIN_SRCS
codegen/arrow_compute/ext/sort_kernel.cc
codegen/arrow_compute/ext/kernels_ext.cc
shuffle/splitter.cc
operators/columnar_to_row_converter.cc
operators/row_to_columnar_converter.cc
precompile/hash_map.cc
precompile/sparse_hash_map.cc
Expand All @@ -534,15 +537,6 @@ set(SPARK_COLUMNAR_PLUGIN_SRCS
third_party/gandiva/time.cc
)

if(NATIVE_AVX512)
list(APPEND SPARK_COLUMNAR_PLUGIN_SRCS operators/columnar_to_row_converter_avx512.cc)
set(NATIVE_AVX512_FLAG "-march=native")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NATIVE_AVX512_FLAG}")
add_definitions(-DNATIVE_AVX512)
else()
list(APPEND SPARK_COLUMNAR_PLUGIN_SRCS operators/columnar_to_row_converter.cc)
endif()

add_subdirectory(third_party/gandiva)
message(STATUS "thirdparty is ${THIRDPARTY_GANDIVA_SRCS}")
file(MAKE_DIRECTORY ${root_directory}/releases)
Expand Down
Loading

0 comments on commit cd2e378

Please sign in to comment.