Skip to content

Commit 6558afa

Browse files
committed
update mainline
1 parent 22ee2f4 commit 6558afa

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎examples/qualcomm/oss_scripts/hf_image_sample_exporter.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
import numpy as np
1212
from executorch.backends.qualcomm.export_utils import (
13+
Device,
1314
make_quantizer,
1415
QnnConfig,
1516
setup_common_args_and_variables,
16-
SimpleADB,
1717
)
1818
from executorch.backends.qualcomm.quantizer.quantizer import QuantDtype
1919
from executorch.examples.qualcomm.utils import (
@@ -84,19 +84,19 @@ def main(args):
8484
et_program_manager.write_to_file(f)
8585
logging.info(f"wrote {pte_path} ({os.path.getsize(pte_path)} bytes)")
8686

87-
adb = SimpleADB(
87+
device = Device(
8888
qnn_config=qnn_config,
8989
pte_path=pte_path,
9090
workspace=f"/data/local/tmp/{getpass.getuser()}/executorch/{pte_filename}",
9191
)
92-
adb.push(inputs=inputs)
93-
adb.execute()
92+
device.push(inputs=inputs)
93+
device.execute()
9494

9595
# collect output data
9696
output_data_folder = f"{args.artifact}/outputs"
9797
make_output_dir(output_data_folder)
9898

99-
adb.pull(host_output_path=args.artifact)
99+
device.pull(host_output_path=args.artifact)
100100

101101
# top-k analysis
102102
predictions = []

‎examples/qualcomm/oss_scripts/hf_llm_exporter.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
import torch
1616
from executorch.backends.qualcomm.export_utils import (
17+
Device,
1718
get_backend_type,
1819
make_quantizer,
1920
QnnConfig,
2021
setup_common_args_and_variables,
21-
SimpleADB,
2222
)
2323
from executorch.backends.qualcomm.hf_transformers.api import get_quant_recipe
2424
from executorch.examples.qualcomm.utils import make_output_dir
@@ -102,17 +102,17 @@ def post_process():
102102
"> outputs/result.txt",
103103
]
104104
)
105-
adb = SimpleADB(
105+
device = Device(
106106
qnn_config=qnn_config,
107107
pte_path=pte_path,
108108
workspace=workspace,
109109
runner=runner_bin,
110110
)
111111
# No pregen inputs, input_list is not required
112-
adb.push(inputs=[], files=[tokenizer_json_path])
113-
adb.execute(custom_runner_cmd=runner_cmd)
112+
device.push(inputs=[], files=[tokenizer_json_path])
113+
device.execute(custom_runner_cmd=runner_cmd)
114114

115-
adb.pull(host_output_path=args.artifact, callback=post_process)
115+
device.pull(host_output_path=args.artifact, callback=post_process)
116116

117117
if args.ip and args.port != -1:
118118
with Client((args.ip, args.port)) as conn:

0 commit comments

Comments
 (0)