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.
Enable more portable and optimized kernel tests (pytorch#3900)
Summary: Pull Request resolved: pytorch#3900 Test Plan: CI Reviewed By: shoumikhin Differential Revision: D58307445 Pulled By: kirklandsign fbshipit-source-id: 10b98f21ee1253040377bc739e2debea7bf4a3af
- Loading branch information
1 parent
84a11ca
commit 6cac9c1
Showing
14 changed files
with
437 additions
and
401 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# 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. | ||
# | ||
# This file builds portable-specific tests | ||
|
||
cmake_minimum_required(VERSION 3.19) | ||
project(kernels_portable_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_portable_test_sources | ||
# So far we can't generate custom_ops.yaml in OSS so we can't build op | ||
# library with op_allclose. We disable the test for now. | ||
# "op_allclose_test.cpp" | ||
"op_div_test.cpp" "op_gelu_test.cpp" "op_mul_test.cpp" | ||
) | ||
|
||
et_cxx_test( | ||
kernels_portable_test SOURCES ${_kernels_portable_test_sources} EXTRA_LIBS | ||
portable_kernels portable_ops_lib | ||
) | ||
target_include_directories( | ||
kernels_portable_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
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
Oops, something went wrong.