forked from pytorch/executorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add quantized kernel test (pytorch#3899)
Summary: Quantized kernels are tested in a different way than aten ops, because they need their specific Functions.h header, and we can't re-use aten tests. Modify the generated header path a bit for all tests to use it correctly. Pull Request resolved: pytorch#3899 Reviewed By: shoumikhin Differential Revision: D58301544 Pulled By: kirklandsign fbshipit-source-id: 7d12b826b118e828bf71f8042f9b68205c2f6e07
- Loading branch information
1 parent
5715d2f
commit 9a813e2
Showing
8 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
# This file should be formatted with | ||
# ~~~ | ||
# cmake-format -i CMakeLists.txt | ||
# ~~~ | ||
# It should also be cmake-lint clean. | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.19) | ||
project(kernels_quantized_test) | ||
|
||
# Use C++17 for test. | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../..) | ||
|
||
include(${EXECUTORCH_ROOT}/build/Test.cmake) | ||
|
||
set(_kernels_quantized_test_sources | ||
op_add_test.cpp | ||
op_choose_qparams_test.cpp | ||
op_dequantize_test.cpp | ||
op_embedding4b_test.cpp | ||
op_embedding_test.cpp | ||
op_mixed_linear_test.cpp | ||
op_mixed_mm_test.cpp | ||
op_quantize_test.cpp | ||
) | ||
|
||
et_cxx_test( | ||
kernels_quantized_test | ||
SOURCES | ||
${_kernels_quantized_test_sources} | ||
EXTRA_LIBS | ||
quantized_kernels | ||
quantized_ops_lib | ||
portable_kernels | ||
portable_ops_lib | ||
) | ||
target_include_directories( | ||
kernels_quantized_test PRIVATE "${CMAKE_INSTALL_PREFIX}/include" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters