Skip to content

Commit 0479698

Browse files
Arm backend: Make get_intermediate_path private
Change-Id: Ib9626fd30a54b6f6b345f2ccdad8ff085b4bb81e Signed-off-by: Sebastian Larsson <sebastian.larsson@arm.com>
1 parent 7a48c2c commit 0479698

File tree

8 files changed

+8
-26
lines changed

8 files changed

+8
-26
lines changed

backends/arm/common/arm_compile_spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def _create_default_pipeline_config(self) -> ArmPassPipelineConfig:
238238
config.disable_masked_softmax()
239239
return config
240240

241-
def get_intermediate_path(self) -> str | None:
241+
def _get_intermediate_path(self) -> str | None:
242242
"""Gets the path used for dumping intermediate results such as tosa and
243243
pte.
244244

backends/arm/ethosu/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _compile_tosa_flatbuffer(
7474
tosa_flatbuffer,
7575
compile_flags,
7676
verbose=logger.getEffectiveLevel() <= logging.INFO,
77-
intermediate_path=compile_spec.get_intermediate_path(),
77+
intermediate_path=compile_spec._get_intermediate_path(),
7878
)
7979
return binary
8080

backends/arm/test/tester/analyze_output_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def dump_error_output(
307307
# Capture assertion error and print more info
308308
banner = "=" * 40 + "TOSA debug info" + "=" * 40
309309
logger.error(banner)
310-
path_to_tosa_files = tester.compile_spec.get_intermediate_path()
310+
path_to_tosa_files = tester.compile_spec._get_intermediate_path()
311311

312312
if path_to_tosa_files is None:
313313
path_to_tosa_files = tempfile.mkdtemp(prefix="executorch_result_dump_")

backends/arm/test/tester/serialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def run_artifact(self, inputs):
6060
"Tried running artifact from Serialize stage without running the stage."
6161
)
6262
inputs_flattened, _ = tree_flatten(inputs)
63-
intermediate_path = self.compile_spec.get_intermediate_path()
63+
intermediate_path = self.compile_spec._get_intermediate_path()
6464
target_board = get_target_board(self.compile_spec)
6565
elf_path = get_elf_path(target_board, self.use_portable_ops)
6666

backends/arm/tosa/backend.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def _preprocess( # noqa: C901
204204
205205
"""
206206
# if a debug/test build capture output files from TOSA stage
207-
artifact_path = compile_spec.get_intermediate_path()
207+
artifact_path = compile_spec._get_intermediate_path()
208208
tosa_spec = compile_spec.tosa_spec
209209
dump_debug_info = compile_spec.tosa_debug_mode
210210
debug_hook = None
@@ -332,7 +332,7 @@ def _preprocess_module( # noqa: C901
332332
"""
333333
tosa_spec = compile_spec.tosa_spec
334334
node_to_id_map = _annotate_external_ids(graph_module.graph)
335-
artifact_path = compile_spec.get_intermediate_path()
335+
artifact_path = compile_spec._get_intermediate_path()
336336
output_order_workaround = compile_spec.get_output_order_workaround()
337337

338338
# TODO: Fix the need to lazily import this.
@@ -436,7 +436,7 @@ def filter_tosa_compile_specs(
436436
tosa_compile_spec.set_pass_pipeline_config(pipeline_config)
437437
return (
438438
tosa_compile_spec.dump_intermediate_artifacts_to(
439-
compile_spec.get_intermediate_path()
439+
compile_spec._get_intermediate_path()
440440
)
441441
.dump_debug_info(compile_spec.tosa_debug_mode)
442442
.set_output_order_workaround(compile_spec.output_order_workaround)

backends/arm/vgf/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def _compile_tosa_flatbuffer(
7272
7373
"""
7474
compile_flags = compile_spec.compiler_flags
75-
artifact_path = compile_spec.get_intermediate_path()
75+
artifact_path = compile_spec._get_intermediate_path()
7676
# Pass on the TOSA flatbuffer to the vgf compiler.
7777
binary = vgf_compile(tosa_flatbuffer, compile_flags, artifact_path, tag_name)
7878
return binary

docs/source/backends/arm-ethos-u/arm-ethos-u-overview.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,6 @@ pte.
7373
Args:
7474
- **output_path**: Path to dump intermediate results to.
7575

76-
```python
77-
def EthosUCompileSpec.get_intermediate_path(self) -> str | None:
78-
```
79-
Gets the path used for dumping intermediate results such as tosa and
80-
pte.
81-
82-
Returns:
83-
Path where intermediate results are saved.
84-
8576
```python
8677
def EthosUCompileSpec.get_output_order_workaround(self) -> bool:
8778
```

docs/source/backends/arm-vgf/arm-vgf-overview.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ pte.
6464
Args:
6565
- **output_path**: Path to dump intermediate results to.
6666

67-
```python
68-
def VgfCompileSpec.get_intermediate_path(self) -> str | None:
69-
```
70-
Gets the path used for dumping intermediate results such as tosa and
71-
pte.
72-
73-
Returns:
74-
Path where intermediate results are saved.
75-
7667
```python
7768
def VgfCompileSpec.get_output_order_workaround(self) -> bool:
7869
```

0 commit comments

Comments
 (0)