File tree Expand file tree Collapse file tree 8 files changed +64
-4
lines changed Expand file tree Collapse file tree 8 files changed +64
-4
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ function(et_cxx_test target_name)
36
36
cmake_parse_arguments (ET_CXX_TEST "" "" "${multi_arg_names} " ${ARGN} )
37
37
38
38
add_executable (${target_name} ${ET_CXX_TEST_SOURCES} ${EXECUTORCH_ROOT} /runtime/core/exec_aten/testing_util/tensor_util.cpp )
39
+ find_package (GTest )
39
40
# Includes gtest, gmock, executorch by default
40
41
target_link_libraries (
41
42
${target_name} GTest::gtest GTest::gtest_main GTest::gmock executorch
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ build_android_native_library() {
40
40
EXECUTORCH_BUILD_NEURON=OFF
41
41
fi
42
42
43
- cmake . -DCMAKE_INSTALL_PREFIX=" ${CMAKE_OUT} " \
43
+ cmake --trace . -DCMAKE_INSTALL_PREFIX=" ${CMAKE_OUT} " \
44
44
-DCMAKE_TOOLCHAIN_FILE=" ${ANDROID_NDK} /build/cmake/android.toolchain.cmake" \
45
45
-DANDROID_ABI=" ${ANDROID_ABI} " \
46
46
-DANDROID_PLATFORM=android-26 \
@@ -69,7 +69,7 @@ build_android_native_library() {
69
69
fi
70
70
cmake --build " ${CMAKE_OUT} " -j " ${CMAKE_JOBS} " --target install --config " ${EXECUTORCH_CMAKE_BUILD_TYPE} "
71
71
72
- cmake extension/android \
72
+ cmake --trace extension/android \
73
73
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK} /build/cmake/android.toolchain.cmake \
74
74
-DANDROID_ABI=" ${ANDROID_ABI} " \
75
75
-DANDROID_PLATFORM=android-26 \
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ build_native_library() {
18
18
CMAKE_OUT=" cmake-out-android-${ANDROID_ABI} "
19
19
ANDROID_NDK=" ${ANDROID_NDK:-/ opt/ ndk} "
20
20
EXECUTORCH_CMAKE_BUILD_TYPE=" ${EXECUTORCH_CMAKE_BUILD_TYPE:- Release} "
21
- cmake . -DCMAKE_INSTALL_PREFIX=" ${CMAKE_OUT} " \
21
+ cmake --trace . -DCMAKE_INSTALL_PREFIX=" ${CMAKE_OUT} " \
22
22
-DCMAKE_TOOLCHAIN_FILE=" ${ANDROID_NDK} /build/cmake/android.toolchain.cmake" \
23
23
-DANDROID_ABI=" ${ANDROID_ABI} " \
24
24
-DEXECUTORCH_BUILD_XNNPACK=ON \
@@ -33,7 +33,7 @@ build_native_library() {
33
33
34
34
cmake --build " ${CMAKE_OUT} " -j16 --target install
35
35
36
- cmake extension/android \
36
+ cmake --trace extension/android \
37
37
-DCMAKE_TOOLCHAIN_FILE=" ${ANDROID_NDK} " /build/cmake/android.toolchain.cmake \
38
38
-DANDROID_ABI=" ${ANDROID_ABI} " \
39
39
-DCMAKE_INSTALL_PREFIX=c" ${CMAKE_OUT} " \
Original file line number Diff line number Diff line change @@ -121,3 +121,8 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT)
121
121
LIBRARY DESTINATION executorch/extension/llm/custom_ops
122
122
)
123
123
endif ()
124
+
125
+ add_subdirectory (spinquant/third-party/FFHT )
126
+ if (BUILD_TESTING )
127
+ add_subdirectory (spinquant/test )
128
+ endif ()
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+ #
4
+ # This source code is licensed under the BSD-style license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ # @generated by test/utils/generate_gtest_cmakelists.py
8
+ #
9
+ # This file should be formatted with
10
+ # ~~~
11
+ # cmake-format -i CMakeLists.txt
12
+ # ~~~
13
+ # It should also be cmake-lint clean.
14
+ #
15
+
16
+ cmake_minimum_required (VERSION 3.19 )
17
+
18
+ set (EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR} /../../../../.. )
19
+
20
+ include (${EXECUTORCH_ROOT} /build/Test.cmake )
21
+
22
+ set (_test_srcs
23
+ fast_hadamard_transform_test.cpp fast_hadamard_transform_test_impl.cpp
24
+ op_fast_hadamard_transform_test.cpp
25
+ )
26
+
27
+ et_cxx_test (
28
+ extension_llm_custom_ops_spinquant_test SOURCES ${_test_srcs} EXTRA_LIBS
29
+ custom_ops dumb_fht
30
+ )
Original file line number Diff line number Diff line change
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+ #
4
+ # This source code is licensed under the BSD-style license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ # Please this file formatted by running:
8
+ # ~~~
9
+ # cmake-format -i CMakeLists.txt
10
+ # ~~~
11
+
12
+ add_library (dumb_fht dumb_fht.c )
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ build_executorch() {
35
35
cmake . \
36
36
-DCMAKE_INSTALL_PREFIX=cmake-out \
37
37
-DEXECUTORCH_USE_CPP_CODE_COVERAGE=ON \
38
+ -DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON \
38
39
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
39
40
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
40
41
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
Original file line number Diff line number Diff line change 1
1
{ "tests" : [
2
+ {
3
+ "directory" : " extension/llm/custom_ops/spinquant/test" ,
4
+ "sources" : [
5
+ " fast_hadamard_transform_test.cpp" ,
6
+ " fast_hadamard_transform_test_impl.cpp" ,
7
+ " op_fast_hadamard_transform_test.cpp"
8
+ ],
9
+ "additional_libs" : [
10
+ " custom_ops"
11
+ ]
12
+ },
2
13
{
3
14
"directory" : " extension/data_loader/test" ,
4
15
"sources" : [
You can’t perform that action at this time.
0 commit comments