Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

check isa for UT, use OMP as default #117

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ if (NS_BTLA_UT)
endif()
include(FindOpenMP)

set(BTLA_USE_OPENMP ON)
airMeng marked this conversation as resolved.
Show resolved Hide resolved
add_subdirectory(bestla)

add_subdirectory(neural_speed)
10 changes: 6 additions & 4 deletions bestla/bestla/ut/kernel_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,16 @@ class UT_LayerNormalization {
public:
UT_LayerNormalization() {
UT_START();
ut<float, BTLA_ISA::AVX512F>(4096, false, true, true);
ut<float, BTLA_ISA::AVX512F>(4096, false, false, false);
ut<float, BTLA_ISA::AVX512F>(111, false, true, true);
ut<float, BTLA_ISA::AVX512F>(111, true, true, true);
CheckISA(AVX2);
ut<float, BTLA_ISA::AVX2>(4096, false, true, true);
ut<float, BTLA_ISA::AVX2>(4096, false, false, false);
ut<float, BTLA_ISA::AVX2>(111, false, true, true);
ut<float, BTLA_ISA::AVX2>(111, true, true, true);
CheckISA(AVX512F);
ut<float, BTLA_ISA::AVX512F>(4096, false, true, true);
ut<float, BTLA_ISA::AVX512F>(4096, false, false, false);
ut<float, BTLA_ISA::AVX512F>(111, false, true, true);
ut<float, BTLA_ISA::AVX512F>(111, true, true, true);
}
template <typename T, BTLA_ISA ISA>
void ut(int norm_size, bool simplified, bool hasscale, bool hasbias) {
Expand Down
Loading