Skip to content

Commit 8617c87

Browse files
committed
Still testing
1 parent 60b5afc commit 8617c87

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

examples/selective_build/test_selective_build.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,14 @@ test_cmake_select_ops_add_in_list() {
143143
${PYTHON_EXECUTABLE} -m examples.portable.scripts.export --model_name="add_mul"
144144
local example_dir=examples/selective_build
145145
local build_dir=cmake-out/${example_dir}
146-
rm -rf ${build_dir}
146+
# rm -rf ${build_dir}
147147
retry cmake -DCMAKE_BUILD_TYPE=Debug \
148148
-DEXECUTORCH_SELECT_OPS_LIST="aten::add.out,aten::mm.out" \
149-
-DCMAKE_INSTALL_PREFIX=cmake-out \
150-
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
151-
-B${build_dir} \
152-
${example_dir}
149+
#-DEXECUTORCH_SELECTIVE_BUILD_DTYPE=True \
150+
-DCMAKE_INSTALL_PREFIX=cmake-out \
151+
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
152+
-B${build_dir} \
153+
${example_dir}
153154

154155
echo "Building ${example_dir}"
155156
cmake --build ${build_dir} -j9 --config Debug
@@ -228,7 +229,7 @@ then
228229
# test_cmake_select_all_ops
229230
# test_cmake_select_ops_in_list
230231
# test_cmake_select_ops_in_yaml
231-
# test_cmake_select_ops_add_in_yaml
232+
# test_cmake_select_ops_add_in_list
232233
test_cmake_select_ops_in_model
233234
elif [[ $1 == "buck2" ]];
234235
then

kernels/portable/cpu/selective_build.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ inline constexpr bool should_include_kernel_dtype(
2121
executorch::aten::ScalarType scalar_type
2222
) {
2323
return ((executorch::aten::string_view(operator_name).compare("add.out") == 0)
24-
&& (scalar_type == executorch::aten::ScalarType::Float || scalar_type == executorch::aten::ScalarType::Int))
25-
|| ((executorch::aten::string_view(operator_name).compare("mul.out") == 0)
26-
&& (scalar_type == executorch::aten::ScalarType::Float));
24+
&& (scalar_type == executorch::aten::ScalarType::Float || scalar_type == executorch::aten::ScalarType::Int));
25+
// || ((executorch::aten::string_view(operator_name).compare("mul.out") == 0)
26+
// && (scalar_type == executorch::aten::ScalarType::Float));
2727
// || ((executorch::aten::string_view(operator_name).compare("sub.out") == 0)
2828
// && (true));
2929
}

tools/cmake/Codegen.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ function(generate_bindings_for_kernels)
103103
set(_out_dir ${CMAKE_CURRENT_BINARY_DIR}/${GEN_LIB_NAME})
104104
# By default selective build output is selected_operators.yaml
105105
set(_oplist_yaml ${_out_dir}/selected_operators.yaml)
106+
set(_opvariants_h ${_out_dir}/selected_op_variants.h)
106107

107108
# Command to codegen C++ wrappers to register custom ops to both PyTorch and
108109
# Executorch runtime.

0 commit comments

Comments
 (0)