Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions backends/qualcomm/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ def is_node_supported(self, _, node: torch.fx.Node) -> bool:
return True


def qnn_capture_config():
return exir.CaptureConfig(enable_aot=True)


def qnn_edge_config() -> exir.EdgeCompileConfig:
return exir.EdgeCompileConfig(
_check_ir_validity=False,
Expand Down
24 changes: 10 additions & 14 deletions devtools/etrecord/tests/etrecord_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,12 +618,10 @@ def test_add_extra_export_modules(self):

# Create additional module to add
f2 = models.BasicSinMax()
captured_output2 = exir.capture(
f2, f2.get_random_inputs(), exir.CaptureConfig()
)
captured_output2 = export(f2, f2.get_random_inputs(), strict=True)

extra_modules = {
"new_module": captured_output2.exported_program,
"new_module": captured_output2,
}

# Add extra export modules
Expand All @@ -640,7 +638,7 @@ def test_add_extra_export_modules(self):
)
self.check_graph_closeness(
etrecord.graph_map["new_module/forward"],
captured_output2.exported_program.graph_module,
captured_output2.graph_module,
)

def test_add_extra_export_modules_reserved_name_validation(self):
Expand Down Expand Up @@ -1066,13 +1064,11 @@ def test_add_exported_program_already_exists_exception(self):

# Create another exported program to try to add
f2 = models.BasicSinMax()
captured_output2 = exir.capture(
f2, f2.get_random_inputs(), exir.CaptureConfig()
)
captured_output2 = export(f2, f2.get_random_inputs(), strict=True)

# Verify that adding exported program raises RuntimeError
with self.assertRaises(RuntimeError) as context:
etrecord.add_exported_program(captured_output2.exported_program)
etrecord.add_exported_program(captured_output2)

self.assertIn(
"Exported program already exists in the ETRecord",
Expand Down Expand Up @@ -1202,11 +1198,11 @@ def test_add_edge_dialect_program_already_exists_exception(self):

# Create another edge program to try to add
f2 = models.BasicSinMax()
captured_output2 = exir.capture(
f2, f2.get_random_inputs(), exir.CaptureConfig()
)
edge_output2 = captured_output2.to_edge(
exir.EdgeCompileConfig(_check_ir_validity=False, _use_edge_ops=False)
edge_output2 = to_edge(
export(f2, f2.get_random_inputs(), strict=True),
compile_config=exir.EdgeCompileConfig(
_check_ir_validity=False, _use_edge_ops=False
),
)

# Verify that adding edge dialect program raises RuntimeError
Expand Down
10 changes: 8 additions & 2 deletions devtools/size_analysis_tool/size_analysis_tool_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
XnnpackFloatingPointPartitioner,
)
from executorch.backends.xnnpack.utils.configs import (
get_transform_passes,
get_xnnpack_edge_compile_config,
get_xnnpack_executorch_backend_config,
)
Expand All @@ -19,6 +20,7 @@
generate_model_size_information,
)
from executorch.exir import to_edge
from executorch.exir.backend.backend_api import to_backend, validation_disabled
from executorch.exir.passes.spec_prop_pass import SpecPropPass
from torch.export import export

Expand Down Expand Up @@ -56,10 +58,14 @@ def forward(self, x):
edge_program = to_edge(
export(mm, (test_input,), strict=True),
compile_config=get_xnnpack_edge_compile_config(),
)
).transform(get_transform_passes())
partitioner = XnnpackFloatingPointPartitioner()

delegated_program = edge_program.to_backend(partitioner)
with validation_disabled():
delegated_program = edge_program
delegated_program._edge_programs["forward"] = to_backend(
edge_program.exported_program(), partitioner
)

program = delegated_program.to_executorch(
get_xnnpack_executorch_backend_config([SpecPropPass()]),
Expand Down
1 change: 1 addition & 0 deletions exir/backend/test/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ fbcode_target(_kind = runtime.python_library,
],
)


fbcode_target(_kind = runtime.python_test,
name = "test_to_backend_multi_method",
srcs = [
Expand Down
32 changes: 0 additions & 32 deletions exir/tests/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,6 @@ runtime.python_library(
],
)

runtime.python_test(
name = "tracer",
srcs = [
"test_tracer.py",
],
# Static listing does not support tests generated in runtime.
supports_static_listing = False,
deps = [
"fbsource//third-party/pypi/parameterized:parameterized",
":lib",
":models",
"//caffe2:torch",
"//caffe2/functorch:functorch_src",
"//executorch/exir:lib",
"//executorch/exir:tracer",
"//executorch/exir/dialects:lib",
],
)

python_unittest(
name = "serde",
Expand Down Expand Up @@ -339,20 +321,6 @@ python_unittest(
],
)

runtime.python_test(
name = "capture",
srcs = [
"test_capture.py",
],
# Static listing does not support tests generated in runtime.
supports_static_listing = False,
deps = [
"fbsource//third-party/pypi/parameterized:parameterized",
":models",
"//caffe2:torch",
"//executorch/exir:lib",
],
)

python_unittest(
name = "dynamic_shape_propagation",
Expand Down
29 changes: 0 additions & 29 deletions exir/tests/test_capture.py

This file was deleted.

Loading
Loading