Skip to content

Commit 6ba45eb

Browse files
committed
Missing header error
1 parent b758bcc commit 6ba45eb

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

examples/selective_build/test_selective_build.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ test_cmake_select_ops_in_yaml() {
163163

164164
test_cmake_select_ops_in_dict() {
165165
echo "Exporting MobilenetV2"
166-
${PYTHON_EXECUTABLE} -m examples.portable.scripts.export --model_name="add"
166+
${PYTHON_EXECUTABLE} -m examples.portable.scripts.export --model_name="mv2"
167167

168168
local example_dir=examples/selective_build
169169
local build_dir=cmake-out/${example_dir}
@@ -184,12 +184,12 @@ test_cmake_select_ops_in_dict() {
184184
echo 'Running selective build test'
185185
${build_dir}/selective_build_test --model_path="./mv2.pte"
186186

187-
echo "Removing mv2.pte"
188-
rm "./mv2.pte"
187+
#echo "Removing mv2.pte"
188+
#rm "./mv2.pte"
189189
}
190190

191191
test_cmake_select_ops_in_model() {
192-
local model_name="mv3"
192+
local model_name="mv2"
193193
local model_export_name="${model_name}.pte"
194194
echo "Exporting ${model_name}"
195195
${PYTHON_EXECUTABLE} -m examples.portable.scripts.export --model_name="${model_name}"
@@ -210,7 +210,7 @@ test_cmake_select_ops_in_model() {
210210

211211
strip ${build_dir}/selective_build_test
212212
echo $(stat --format=%s ${build_dir}/selective_build_test)
213-
rm "./${model_export_name}"
213+
#rm "./${model_export_name}"
214214
}
215215

216216
if [[ -z $BUCK ]];
@@ -234,8 +234,8 @@ then
234234
#test_cmake_select_all_ops
235235
#test_cmake_select_ops_in_list
236236
#test_cmake_select_ops_in_yaml
237-
test_cmake_select_ops_in_model
238-
#test_cmake_select_ops_in_dict
237+
test_cmake_select_ops_in_dict
238+
#test_cmake_select_ops_in_model
239239
elif [[ $1 == "buck2" ]];
240240
then
241241
test_buck2_select_all_ops

kernels/portable/cpu/selective_build.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
#include <executorch/runtime/core/exec_aten/exec_aten.h>
1212

1313
#ifdef EXECUTORCH_SELECTIVE_BUILD_DTYPE
14-
inline constexpr bool should_include_kernel_dtype(
15-
const char *operator_name,
16-
executorch::aten::ScalarType scalar_type
17-
) {
18-
//return ((std::string_view(operator_name).compare("convolution.out") == 0)
19-
return ((std::string_view(operator_name).compare("atan2.out") == 0)
14+
#include "selected_op_variants.h"
15+
//inline constexpr bool should_include_kernel_dtype(
16+
// const char *operator_name,
17+
// executorch::aten::ScalarType scalar_type
18+
//) {
19+
// //return ((std::string_view(operator_name).compare("convolution.out") == 0)
20+
// return ((std::string_view(operator_name).compare("atan2.out") == 0)
2021
// && (scalar_type == executorch::aten::ScalarType::Byte
2122
// && scalar_type == executorch::aten::ScalarType::Char
2223
// || scalar_type == executorch::aten::ScalarType::Short
@@ -26,11 +27,11 @@ inline constexpr bool should_include_kernel_dtype(
2627
// || scalar_type == executorch::aten::ScalarType::Float
2728
// || scalar_type == executorch::aten::ScalarType::Double
2829
// )
29-
);
30+
// );
3031
// && (scalar_type == executorch::aten::ScalarType::Float));
3132
// || ((std::string_view(operator_name).compare("mm.out") == 0)
3233
// && (scalar_type == executorch::aten::ScalarType::Float));
33-
}
34+
//}
3435
// include header generated by
3536
// executorch/codegen/tools/gen_selected_op_variants.py
3637
#else

0 commit comments

Comments
 (0)