mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
run code analysis against mobile interpreter (#32276)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/32276 Include mobile interpreter in mobile code analysis pass, which has some manually registered ops in temporary namespaces. The mobile interpreter is still under development and these ops will be removed in the future. This is a temporary step for internal build experiment. Test Plan: Imported from OSS Differential Revision: D19426818 Pulled By: ljk53 fbshipit-source-id: 507453dc801e5f93208f1baea12400beccda9ca5
This commit is contained in:
committed by
Facebook Github Bot
parent
5bc44fb6ea
commit
0ac31a99be
@ -302,6 +302,8 @@ ENDIF(NOT MSVC)
|
||||
# applicable to mobile are disabled by this variable.
|
||||
if (ANDROID OR IOS)
|
||||
set(INTERN_BUILD_MOBILE ON)
|
||||
# Disable developing mobile interpreter for actual mobile build. Enable it elsewhere to capture build error.
|
||||
set(INTERN_DISABLE_MOBILE_INTERP ON)
|
||||
endif()
|
||||
|
||||
# Setting `PYTORCH_BUILD_MOBILE` environment variable can force it to do mobile
|
||||
|
@ -463,7 +463,7 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
|
||||
${TORCH_SRC_DIR}/csrc/jit/vararg_functions.cpp
|
||||
)
|
||||
|
||||
if (NOT INTERN_BUILD_MOBILE)
|
||||
if (NOT INTERN_DISABLE_MOBILE_INTERP)
|
||||
set (MOBILE_SRCS
|
||||
${TORCH_SRC_DIR}/csrc/jit/mobile/function.cpp
|
||||
${TORCH_SRC_DIR}/csrc/jit/mobile/import.cpp
|
||||
|
@ -77,7 +77,7 @@ call_analyzer() {
|
||||
-load="${BUILD_ROOT}/libOpDependencyPass.so" \
|
||||
-op_dependency \
|
||||
-disable-output \
|
||||
-op_schema_pattern="^(aten|quantized|profiler|_test)::[^ ]+" \
|
||||
-op_schema_pattern="^(_aten|_prim|aten|quantized|profiler|_test)::[^ ]+" \
|
||||
-op_register_pattern="c10::RegisterOperators::(op|checkSchemaAndRegisterOp_)" \
|
||||
-op_invoke_pattern="c10::Dispatcher::findSchema|callOp" \
|
||||
-format="${FORMAT}" \
|
||||
|
Reference in New Issue
Block a user