Skip to content

Commit 5d224d7

Browse files
Keep original name of dump_context_from_pte
1 parent 94504ff commit 5d224d7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

backends/qualcomm/tests/test_qnn_delegate.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
)
4242
from executorch.backends.qualcomm.utils.utils import (
4343
capture_program,
44-
dump_qnn_binary_from_pte,
44+
dump_context_from_pte,
4545
from_context_binary,
4646
generate_htp_compiler_spec,
4747
generate_multi_graph_program,
@@ -2577,7 +2577,7 @@ def test_qnn_backend_context_extraction(self):
25772577
pte_path = f"{tmp_dir}/model.pte"
25782578
with open(pte_path, "wb") as f:
25792579
edge_prog_mgr.write_to_file(f)
2580-
dump_qnn_binary_from_pte(pte_path)
2580+
dump_context_from_pte(pte_path)
25812581

25822582
qnn_tool = QnnTool(tmp_dir, pte_path, sample_input)
25832583
qnn_tool.qnn_context_binary_generator()
@@ -2620,7 +2620,7 @@ def test_qnn_backend_dump_context_from_pte(self):
26202620
pte_path = f"{tmp_dir}/model.pte"
26212621
with open(pte_path, "wb") as f:
26222622
edge_prog_mgr.write_to_file(f)
2623-
dump_qnn_binary_from_pte(pte_path)
2623+
dump_context_from_pte(pte_path)
26242624

26252625
qnn_tool = QnnTool(tmp_dir, pte_path, sample_input)
26262626
qnn_tool.qnn_context_binary_generator()
@@ -2641,7 +2641,7 @@ def test_qnn_backend_dump_context_from_pte(self):
26412641
with open(pte_path, "wb") as f:
26422642
edge_prog_mgr.write_to_file(f)
26432643

2644-
dump_qnn_binary_from_pte(pte_path)
2644+
dump_context_from_pte(pte_path)
26452645
binary_name = f"{tmp_dir}/forward_0.bin"
26462646
self.assertTrue(os.path.isfile(binary_name))
26472647
with open(binary_name, "rb") as f:
@@ -3225,7 +3225,7 @@ def test_qnn_backend_context_extraction(self):
32253225
pte_path = f"{tmp_dir}/model.pte"
32263226
with open(pte_path, "wb") as f:
32273227
edge_prog_mgr.write_to_file(f)
3228-
dump_qnn_binary_from_pte(pte_path)
3228+
dump_context_from_pte(pte_path)
32293229

32303230
qnn_tool = QnnTool(tmp_dir, pte_path, sample_input)
32313231
qnn_tool.qnn_context_binary_generator()
@@ -3269,7 +3269,7 @@ def test_qnn_backend_dump_context_from_pte(self):
32693269
pte_path = f"{tmp_dir}/model.pte"
32703270
with open(pte_path, "wb") as f:
32713271
edge_prog_mgr.write_to_file(f)
3272-
dump_qnn_binary_from_pte(pte_path)
3272+
dump_context_from_pte(pte_path)
32733273

32743274
qnn_tool = QnnTool(tmp_dir, pte_path, sample_input)
32753275
qnn_tool.qnn_context_binary_generator()
@@ -3290,7 +3290,7 @@ def test_qnn_backend_dump_context_from_pte(self):
32903290
with open(pte_path, "wb") as f:
32913291
edge_prog_mgr.write_to_file(f)
32923292

3293-
dump_qnn_binary_from_pte(pte_path)
3293+
dump_context_from_pte(pte_path)
32943294
binary_name = f"{tmp_dir}/forward_0.bin"
32953295
self.assertTrue(os.path.isfile(binary_name))
32963296
with open(binary_name, "rb") as f:

backends/qualcomm/utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def replace_linear(module: torch.nn.Module):
187187
return replace_linear(module)
188188

189189

190-
def dump_qnn_binary_from_pte(pte_path):
190+
def dump_context_from_pte(pte_path):
191191
"""
192192
Dump compiled binaries under the same directory of pte_path.
193193
For partitioned graph, there will be multiple files with names f"{graph_name}_{index}".

0 commit comments

Comments
 (0)