mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Revert D20408831: [Lite Interpreter] Operator registration migrate from manual to selective build
Test Plan: revert-hammer Differential Revision: D20408831 Original commit changeset: ec75dd762c46 fbshipit-source-id: f1874088a5970dd220cc027d0020ab6223b9bd93
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ee4cc96eee
commit
586481a6e2
@ -25,9 +25,7 @@ def generate_code(ninja_global=None,
|
||||
install_dir=None,
|
||||
subset=None,
|
||||
disable_autograd=False,
|
||||
selected_op_list_path=None,
|
||||
selected_op_list=None,
|
||||
force_schema_registration=False):
|
||||
selected_op_list_path=None):
|
||||
# cwrap depends on pyyaml, so we can't import it earlier
|
||||
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.insert(0, root)
|
||||
@ -50,7 +48,6 @@ def generate_code(ninja_global=None,
|
||||
gen_autograd_python(declarations_path or DECLARATIONS_PATH, autograd_gen_dir, autograd_dir)
|
||||
|
||||
if subset == "libtorch" or not subset:
|
||||
# TODO: add selected op mechanism in augotrad to save learning size
|
||||
gen_autograd(
|
||||
declarations_path or DECLARATIONS_PATH,
|
||||
autograd_gen_dir,
|
||||
@ -62,9 +59,7 @@ def generate_code(ninja_global=None,
|
||||
jit_gen_dir,
|
||||
tools_jit_templates,
|
||||
disable_autograd=disable_autograd,
|
||||
selected_op_list_path=selected_op_list_path,
|
||||
selected_op_list=selected_op_list,
|
||||
force_schema_registration=force_schema_registration)
|
||||
selected_op_list_path=selected_op_list_path)
|
||||
|
||||
|
||||
def main():
|
||||
@ -87,19 +82,6 @@ def main():
|
||||
'--selected-op-list-path',
|
||||
help='Path to the yaml file that contains the list of operators to include for custom build.',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--selected-op-list',
|
||||
nargs="*",
|
||||
type=str,
|
||||
help="""List of operator names to include for custom build, in addition to those in selected-op-list-path.
|
||||
For example, --selected-op-list aten::add.Tensor aten::_convolution.""",
|
||||
)
|
||||
parser.add_argument(
|
||||
'--force_schema_registration',
|
||||
action='store_true',
|
||||
help='force it to generate schema-only registrations for ops that are not'
|
||||
'listed on --selected-op-list'
|
||||
)
|
||||
options = parser.parse_args()
|
||||
generate_code(
|
||||
options.ninja_global,
|
||||
@ -109,8 +91,6 @@ def main():
|
||||
options.subset,
|
||||
options.disable_autograd,
|
||||
options.selected_op_list_path,
|
||||
options.selected_op_list,
|
||||
options.force_schema_registration,
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user