load("@fbcode_macros//build_defs:python_library.bzl", "python_library") oncall("executorch") python_library( name = "lib", srcs = [ "__init__.py", ], deps = [ ":const_prop_pass", ":debug_handle_generator_pass", ":insert_write_back_for_buffers_pass", ":memory_format_ops_pass", ":memory_planning_pass", ":normalize_transpose_pass", ":prim_ops_py_registry", ":quant_fusion_pass", ":quantize_io_pass", ":remove_noop_pass", ":replace_aten_with_edge_pass", ":replace_broken_ops_with_function_ops_pass", ":replace_edge_with_backend_pass", ":replace_sym_size_op_pass", ":scalar_to_tensor_pass", ":spec_prop_pass", ":sym_shape_eval_pass", ":sym_to_tensor_pass", ":weights_to_outputs_pass", "//caffe2:torch", "//executorch/exir:common", "//executorch/exir:control_flow", "//executorch/exir:delegate", "//executorch/exir:dynamic_shape", "//executorch/exir:error", "//executorch/exir:memory", "//executorch/exir:memory_planning", "//executorch/exir:pass_base", "//executorch/exir:pass_manager", "//executorch/exir/dialects/backend:lib", "//executorch/exir/dialects/edge:lib", "//executorch/exir/operator:convert", ], ) python_library( name = "pass_registry", srcs = [ "pass_registry.py", ], deps = [ "//executorch/exir:error", "//executorch/exir:pass_manager", ], ) python_library( name = "insert_write_back_for_buffers_pass", srcs = [ "insert_write_back_for_buffers_pass.py", ], deps = [ "//caffe2:torch", ], ) python_library( name = "weights_to_outputs_pass", srcs = [ "weights_to_outputs_pass.py", ], deps = [ "//caffe2:torch", ], ) python_library( name = "const_prop_pass", srcs = [ "const_prop_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:pass_base", "//executorch/exir/dialects:lib", ], ) python_library( name = "scalar_to_tensor_pass", srcs = [ "scalar_to_tensor_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:pass_base", ], ) python_library( name = "constant_prop_pass", srcs = [ "constant_prop_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir/dialects:lib", "//executorch/exir/dialects/edge:lib", ], ) python_library( name = "remove_graph_asserts_pass", srcs = [ "remove_graph_asserts_pass.py", ], deps = [ "//caffe2:torch", ], ) python_library( name = "sym_to_tensor_pass", srcs = [ "sym_to_tensor_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:pass_base", ], ) python_library( name = "quant_fusion_pass", srcs = [ "_quant_patterns_and_replacements.py", "quant_fusion_pass.py", ], deps = [ ":replace_aten_with_edge_pass", "//caffe2:torch", "//executorch/exir:pass_base", "//executorch/exir/dialects:lib", ], ) python_library( name = "quantize_io_pass", srcs = [ "quantize_io_pass.py", ], deps = [ "fbsource//third-party/pypi/numpy:numpy", "//caffe2:torch", "//executorch/exir:pass_base", "//executorch/exir/dialects:lib", ], ) python_library( name = "memory_planning_pass", srcs = [ "memory_planning_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:error", "//executorch/exir:memory", "//executorch/exir:memory_planning", "//executorch/exir:pass_base", "//executorch/exir:tensor", "//executorch/exir/operator:convert", ], ) python_library( name = "remove_noop_pass", srcs = [ "remove_noop_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:pass_base", "//executorch/exir/dialects:lib", ], ) python_library( name = "remove_mixed_type_operators", srcs = [ "remove_mixed_type_operators.py", ], deps = [ "//caffe2:torch", "//executorch/exir:pass_base", ], ) python_library( name = "spec_prop_pass", srcs = [ "spec_prop_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:delegate", "//executorch/exir:pass_base", "//executorch/exir:tensor", ], ) python_library( name = "sym_shape_eval_pass", srcs = [ "sym_shape_eval_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:_warnings", "//executorch/exir:pass_base", "//executorch/exir:sym_util", "//executorch/exir:tensor", "//executorch/exir/dialects:lib", ], ) python_library( name = "replace_broken_ops_with_function_ops_pass", srcs = [ "replace_broken_ops_with_function_ops_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:pass_base", ], ) python_library( name = "replace_sym_size_op_pass", srcs = [ "replace_sym_size_op_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:pass_base", ], ) python_library( name = "replace_edge_with_backend_pass", srcs = [ "replace_edge_with_backend_pass.py", ], deps = [ ":prim_ops_py_registry", "//caffe2:torch", "//executorch/exir/dialects:lib", ], ) python_library( name = "normalize_transpose_pass", srcs = [ "normalize_transpose_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:pass_base", ], ) python_library( name = "replace_aten_with_edge_pass", srcs = [ "replace_aten_with_edge_pass.py", ], deps = [ ":prim_ops_py_registry", "//caffe2:torch", "//executorch/exir:pass_base", "//executorch/exir/dialects:lib", "//executorch/exir/dialects/edge:lib", ], ) python_library( name = "debug_handle_generator_pass", srcs = [ "debug_handle_generator_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:graph_module", "//executorch/exir:pass_base", ], ) python_library( name = "prim_ops_py_registry", srcs = ["executorch_prim_ops_registry.py"], deps = [ "//caffe2:torch", "//executorch/exir/dialects:lib", ], ) python_library( name = "dim_order_ops_registry", srcs = ["dim_order_ops_registry.py"], deps = [ "//caffe2:torch", "//executorch/exir:dim_order_utils", "//executorch/exir/dialects:lib", ], ) python_library( name = "memory_format_ops_pass", srcs = [ "memory_format_ops_pass.py", ], deps = [ ":dim_order_ops_registry", "//caffe2:torch", "//executorch/exir:dim_order_utils", "//executorch/exir:pass_base", "//executorch/exir/dialects/edge:lib", ], ) python_library( name = "normalize_view_copy_base_pass", srcs = [ "normalize_view_copy_base_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir/dialects:lib", ], ) python_library( name = "replace_view_copy_with_view_pass", srcs = [ "replace_view_copy_with_view_pass.py", ], deps = [ "//caffe2:torch", "//executorch/exir:memory", "//executorch/exir:tensor", "//executorch/exir/dialects:lib", ], )