Skip to content

Commit d69bd8f

Browse files
committed
size test all ops
1 parent 1b73db4 commit d69bd8f

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

test/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,15 @@ if(CMAKE_BUILD_TYPE EQUAL "Release")
5757
target_link_options(size_test PRIVATE "LINKER:--gc-sections")
5858
endif()
5959

60+
#
61+
# size_test_all_ops: binary with portable ops and no delegate backend
62+
#
63+
add_executable(size_test_all_ops ${_size_test__srcs})
64+
target_link_options_shared_lib(portable_ops_lib)
65+
target_link_libraries(size_test_all_ops executorch portable_ops_lib portable_kernels)
66+
if(CMAKE_BUILD_TYPE EQUAL "Release")
67+
target_link_options(size_test_all_ops PRIVATE "LINKER:--gc-sections")
68+
endif()
69+
6070
# Print all summary
6171
executorch_print_configuration_summary()

test/build_size_test.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ cmake_install_executorch_lib() {
4646
test_cmake_size_test() {
4747
retry cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake-out -Bcmake-out/test test
4848

49-
echo "Build selective build test"
49+
echo "Build size test"
5050
cmake --build cmake-out/test -j9 --config Release
5151

52-
echo 'Size of the binary:'
52+
echo 'ExecuTorch with no ops binary size, unstripped:'
5353
ls -al cmake-out/test/size_test
54+
55+
echo 'ExecuTorch with portable ops binary size, unstripped:'
56+
ls -al cmake-out/test/size_test_all_ops
5457
}
5558

5659
if [[ -z $BUCK2 ]]; then

0 commit comments

Comments
 (0)