Skip to content

Commit 5d15809

Browse files
committed
fix unittest, bump size test threshold to account for op registration now showing up in the test
[ghstack-poisoned]
1 parent 2e1d1e4 commit 5d15809

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

.github/workflows/pull.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ jobs:
371371
size=${arr[4]}
372372
# threshold=48120 on devserver with gcc11.4
373373
# todo(lfq): update once binary size is below 50kb.
374-
threshold="55584"
374+
threshold="63776"
375375
if [[ "$size" -le "$threshold" ]]; then
376376
echo "Success $size <= $threshold"
377377
else
@@ -406,7 +406,7 @@ jobs:
406406
output=$(ls -la cmake-out/test/size_test)
407407
arr=($output)
408408
size=${arr[4]}
409-
threshold="51728"
409+
threshold="51744"
410410
if [[ "$size" -le "$threshold" ]]; then
411411
echo "Success $size <= $threshold"
412412
else

backends/vulkan/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ if(NOT RUNTIME_PATH)
2424
set(RUNTIME_PATH ${CMAKE_CURRENT_SOURCE_DIR}/runtime)
2525
endif()
2626

27-
# Include this file to access target_link_options_shared_lib This is required to
28-
# provide access to target_link_options_shared_lib which allows libraries to be
27+
# Include this file to access executorch_target_link_options_shared_lib This is required to
28+
# provide access to executorch_target_link_options_shared_lib which allows libraries to be
2929
# linked with the --whole-archive flag. This is required for libraries that
3030
# perform dynamic registration via static initialization.
3131
include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake)
@@ -113,7 +113,7 @@ target_include_directories(
113113
target_link_libraries(vulkan_backend PRIVATE vulkan_schema executorch_core)
114114
target_compile_options(vulkan_backend PRIVATE ${VULKAN_CXX_FLAGS})
115115
# Link this library with --whole-archive due to dynamic backend registration
116-
target_link_options_shared_lib(vulkan_backend)
116+
executorch_target_link_options_shared_lib(vulkan_backend)
117117

118118
set_property(TARGET vulkan_backend PROPERTY CXX_STANDARD 17)
119119

backends/vulkan/cmake/ShaderLibrary.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function(vulkan_shader_lib library_name generated_spv_cpp)
8181
target_link_libraries(${library_name} vulkan_backend)
8282
target_compile_options(${library_name} PRIVATE ${VULKAN_CXX_FLAGS})
8383
# Link this library with --whole-archive due to dynamic shader registrations
84-
target_link_options_shared_lib(${library_name})
84+
executorch_target_link_options_shared_lib(${library_name})
8585
endfunction()
8686

8787
# Convenience macro to generate a SPIR-V shader library target. Given the path
@@ -105,7 +105,7 @@ macro(vulkan_shader_library shaders_path library_name)
105105
target_link_libraries(${library_name} vulkan_backend)
106106
target_compile_options(${library_name} PRIVATE ${VULKAN_CXX_FLAGS})
107107
# Link this library with --whole-archive due to dynamic shader registrations
108-
target_link_options_shared_lib(${library_name})
108+
executorch_target_link_options_shared_lib(${library_name})
109109

110110
unset(VULKAN_SHADERGEN_ENV)
111111
unset(VULKAN_SHADERGEN_OUT_PATH)

backends/vulkan/test/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ if(TARGET vulkan_backend)
3535
set(PYTHON_EXECUTABLE python3)
3636
endif()
3737

38-
# Include this file to access target_link_options_shared_lib This is required
39-
# to provide access to target_link_options_shared_lib which allows libraries
38+
# Include this file to access executorch_target_link_options_shared_lib This is required
39+
# to provide access to executorch_target_link_options_shared_lib which allows libraries
4040
# to be linked with the --whole-archive flag. This is required for libraries
4141
# that perform dynamic registration via static initialization.
4242
include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake)
@@ -75,7 +75,7 @@ if(TARGET vulkan_backend)
7575
${CMAKE_CURRENT_SOURCE_DIR}/vulkan_compute_api_test.cpp
7676
)
7777

78-
target_link_options_shared_lib(vulkan_backend)
78+
executorch_target_link_options_shared_lib(vulkan_backend)
7979

8080
add_executable(
8181
vulkan_compute_api_test ${COMPUTE_API_TEST_CPP} ${TEST_UTILS_CPP}

backends/vulkan/test/op_tests/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ if(NOT EXECUTORCH_ROOT)
2929
set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
3030
endif()
3131

32-
# Include this file to access target_link_options_shared_lib This is required to
33-
# provide access to target_link_options_shared_lib which allows libraries to be
32+
# Include this file to access executorch_target_link_options_shared_lib This is required to
33+
# provide access to executorch_target_link_options_shared_lib which allows libraries to be
3434
# linked with the --whole-archive flag. This is required for libraries that
3535
# perform dynamic registration via static initialization.
3636
include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake)
@@ -66,7 +66,7 @@ set(COMMON_INCLUDES
6666
${TORCH_BASE_PATH}/include/torch/csrc/api/include
6767
)
6868

69-
target_link_options_shared_lib(vulkan_backend)
69+
executorch_target_link_options_shared_lib(vulkan_backend)
7070

7171
function(vulkan_op_test test_name test_src)
7272
set(extra_deps ${ARGN})

examples/models/phi-3-mini/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ set(_common_include_directories
2727
list(APPEND CMAKE_FIND_ROOT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../../..)
2828
find_package(executorch CONFIG REQUIRED FIND_ROOT_PATH_BOTH)
2929

30-
executorch_target_link_options_shared_lib(executorch)
31-
3230
set(BUILD_TESTING OFF)
3331
if(NOT TARGET extension_llm_runner)
3432
message(

0 commit comments

Comments
 (0)