File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,7 @@ endif()
280
280
# Generate lib to register quantized ops
281
281
if (REGISTER_QUANTIZED_OPS )
282
282
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /kernels/quantized )
283
+ list (APPEND _libs quantized_ops_lib )
283
284
endif ()
284
285
285
286
# ios can only build library but not binary
Original file line number Diff line number Diff line change @@ -30,6 +30,14 @@ test_buck2_quantization() {
30
30
31
31
echo " Run example.py"
32
32
${PYTHON_EXECUTABLE} -m " examples.quantization.example" --so_library=" $SO_LIB " --model_name=" $1 "
33
+
34
+ echo ' Running executor_runner'
35
+ buck2 run //examples/executor_runner:executor_runner \
36
+ --config=executorch.register_quantized_ops=1 -- --model_path=" ./$1 .pte"
37
+ # should give correct result
38
+
39
+ echo " Removing $1 .pte"
40
+ rm " ./$1 .pte"
33
41
}
34
42
35
43
test_cmake_quantization () {
@@ -52,6 +60,13 @@ test_cmake_quantization() {
52
60
53
61
echo " Run example.py, shared library $SO_LIB "
54
62
${PYTHON_EXECUTABLE} -m " examples.quantization.example" --so_library=" $SO_LIB " --model_name=" $1 "
63
+
64
+ echo ' Running executor_runner'
65
+ cmake-out/executor_runner --model_path=" ./$1 .pte"
66
+ # should give correct result
67
+
68
+ echo " Removing $1 .pte"
69
+ rm " ./$1 .pte"
55
70
}
56
71
57
72
if [[ -z $PYTHON_EXECUTABLE ]];
Original file line number Diff line number Diff line change @@ -52,5 +52,5 @@ gen_custom_ops_aot_lib("quantized_ops_aot_lib" "${_quantized_sources}")
52
52
53
53
# Build a library for _quantized_kernels_srcs
54
54
#
55
- # quantized_kernels: Pure-C++ kernel library for quantized ops
56
- gen_operators_lib ("quantized_kernels " "${_quantized_kernels__srcs} " )
55
+ # quantized_ops_lib: Register quantized ops kernels into Executorch runtime
56
+ gen_operators_lib ("quantized_ops_lib " "${_quantized_kernels__srcs} " )
You can’t perform that action at this time.
0 commit comments