Skip to content

Commit 379e661

Browse files
Arm backend: Make from_list_hook private
This functions is not part of the public API and should therefore be renamed to `_from_list_hook`. Change-Id: I84ed6b890be4d975c2b7d7f8bffcfc6ea349570f Signed-off-by: Sebastian Larsson <sebastian.larsson@arm.com>
1 parent 4c51461 commit 379e661

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

backends/arm/common/arm_compile_spec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ def from_list(cls, compile_specs: list[CompileSpec]): # noqa: C901
134134
output_order_workaround=output_order_workaround,
135135
pipeline_config=pipeline_config,
136136
)
137-
cls.from_list_hook(compile_spec, unknown_specs)
137+
cls._from_list_hook(compile_spec, unknown_specs)
138138
compile_spec.validate()
139139
return compile_spec
140140

141141
@classmethod
142-
def from_list_hook(cls, compile_spec, specs: dict[str, str]): # noqa: B027
142+
def _from_list_hook(cls, compile_spec, specs: dict[str, str]): # noqa: B027
143143
"""Allows subclasses to hook into parsing compile spec lists."""
144144
pass
145145

backends/arm/ethosu/compile_spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def to_list(self):
128128
return compile_specs
129129

130130
@classmethod
131-
def from_list_hook(cls, compile_spec, specs: dict[str, str]):
131+
def _from_list_hook(cls, compile_spec, specs: dict[str, str]):
132132
"""Restore target-specific metadata from serialized compile specs."""
133133
compile_spec.target = specs.get(cls._TARGET_KEY, None)
134134

backends/arm/scripts/docgen/docgen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def generate_ethos_u_docs():
135135
"""Generates documentation for the Ethos-U components in the backend."""
136136
compilespec_string = get_class_docstring(
137137
EthosUCompileSpec,
138-
("DebugMode", "to_list", "from_list", "from_list_hook", "validate"),
138+
("DebugMode", "to_list", "from_list", "validate"),
139139
)
140140
partitioner_string = get_class_docstring(EthosUPartitioner)
141141
quantizer_string = get_class_docstring(
@@ -190,7 +190,7 @@ def generate_vgf_docs():
190190
"""Generates documentation for the VGF components in the backend."""
191191
compilespec_string = get_class_docstring(
192192
VgfCompileSpec,
193-
("DebugMode", "to_list", "from_list", "from_list_hook", "validate"),
193+
("DebugMode", "to_list", "from_list", "validate"),
194194
)
195195
partitioner_string = get_class_docstring(VgfPartitioner)
196196
quantizer_string = get_class_docstring(

backends/arm/tosa/compile_spec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def get_output_format(cls) -> str:
3939
return "tosa"
4040

4141
@classmethod
42-
def from_list_hook(cls, compile_spec, specs: dict[str, str]):
43-
super().from_list_hook(compile_spec, specs)
42+
def _from_list_hook(cls, compile_spec, specs: dict[str, str]):
43+
super()._from_list_hook(compile_spec, specs)
4444

4545
def _create_default_pipeline_config(self):
4646
config = super()._create_default_pipeline_config()

0 commit comments

Comments
 (0)