Skip to content

Commit 75b800f

Browse files
authored
Merge branch 'main' into tosa_files_naming
2 parents 056019e + 2303947 commit 75b800f

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.ci/scripts/unittest-buck2.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ set -eux
88

99
# TODO: expand this to //...
1010
# TODO: can't query cadence & vulkan backends
11-
# TODO: can't query //kernels/prim_ops because of a cpp_unittest and
12-
# broken code in shim to read oss.folly_cxx_tests. Sending fix but it
13-
# needs to propagate and we need a submodule update.
11+
# TODO: can't query //kernels/prim_ops because of non-buckified stuff in OSS.
1412
buck2 query "//backends/apple/... + //backends/example/... + \
1513
//backends/mediatek/... + //backends/test/... + //backends/transforms/... + \
1614
//backends/xnnpack/... + //configurations/... + //kernels/aten/... + \
@@ -20,7 +18,9 @@ buck2 query "//backends/apple/... + //backends/example/... + \
2018
UNBUILDABLE_OPTIMIZED_OPS_REGEX="gelu|fft_r2c|log_softmax"
2119
BUILDABLE_OPTIMIZED_OPS=$(buck2 query //kernels/optimized/cpu/... | grep -E -v $UNBUILDABLE_OPTIMIZED_OPS_REGEX)
2220

23-
BUILDABLE_KERNELS_PRIM_OPS_TARGETS=$(buck2 query //kernels/prim_ops/... | grep -v prim_ops_test_py)
21+
# TODO: build prim_ops_test_cpp again once supported_features works in
22+
# OSS buck.
23+
BUILDABLE_KERNELS_PRIM_OPS_TARGETS=$(buck2 query //kernels/prim_ops/... | grep -v prim_ops_test)
2424
# TODO: expand the covered scope of Buck targets.
2525
# //runtime/kernel/... is failing because //third-party:torchgen_files's shell script can't find python on PATH.
2626
# //runtime/test/... requires Python torch, which we don't have in our OSS buck setup.

examples/arm/run.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ function help() {
3939
echo "Usage: $(basename $0) [options]"
4040
echo "Options:"
4141
echo " --model_name=<MODEL> Model file .py/.pth/.pt, builtin model or a model from examples/models. Passed to aot_arm_compiler"
42-
echo " --model_input=<INPUT> Provide model input .pt file to override the input in the model file. Passed to aot_arm_compiler"
42+
echo " --model_input=<INPUT> Provide model input .pt file to override the input in the model file. Passed to aot_arm_compiler"
43+
echo " NOTE: Inference in FVP is done with a dummy input full of ones. Use bundleio flag to run the model in FVP with the custom input or the input from the model file."
4344
echo " --aot_arm_compiler_flags=<FLAGS> Only used if --model_name is used Default: ${aot_arm_compiler_flags}"
4445
echo " --portable_kernels=<OPS> Comma separated list of portable (non delagated) kernels to include Default: ${portable_kernels}"
4546
echo " --target=<TARGET> Target to build and run for Default: ${target}"
@@ -200,7 +201,11 @@ for i in "${!test_model[@]}"; do
200201

201202
# Remove old pte files
202203
rm -f "${output_folder}/${model_filename}"
203-
204+
205+
if [ "$model_input_set" = true ]; then
206+
model_compiler_flags="${model_compiler_flags} --model_input=${model_input}"
207+
fi
208+
204209
ARM_AOT_CMD="python3 -m examples.arm.aot_arm_compiler --model_name=${model} --target=${target} ${model_compiler_flags} --intermediate=${output_folder} --output=${pte_file} --so_library=$SO_LIB --system_config=${system_config} --memory_mode=${memory_mode} $bundleio_flag"
205210
echo "CALL ${ARM_AOT_CMD}" >&2
206211
${ARM_AOT_CMD} 1>&2

kernels/test/targets.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def define_common_targets():
3737
],
3838
fbcode_exported_deps = [
3939
"//common/gtest:gtest",
40-
],
40+
] if not runtime.is_oss else [],
4141
xplat_exported_deps = [
4242
"//third-party/googletest:gtest_main",
4343
],
@@ -68,7 +68,7 @@ def define_common_targets():
6868
fbcode_exported_deps = [
6969
"//common/init:init",
7070
"//common/gtest:gtest",
71-
],
71+
] if not runtime.is_oss else [],
7272
xplat_exported_deps = [
7373
"//xplat/folly:init_init",
7474
"//third-party/googletest:gtest_main",

0 commit comments

Comments
 (0)