@@ -102,8 +102,8 @@ def parse_qnn_config(self):
102102 self .qnn_config = {}
103103 # Copy key-value pairs to the class object
104104 for key , value in config_data .items ():
105- if key == QnnConstants .CONVERTOR_ARGS_EXTENSION_STR :
106- self .check_extension_arg (key , value , QnnConstants .IMMUTABLE_CONVERTOR_ARGS )
105+ if key == QnnConstants .CONVERTER_ARGS_EXTENSION_STR :
106+ self .check_extension_arg (key , value , QnnConstants .IMMUTABLE_CONVERTER_ARGS )
107107 if key == QnnConstants .CONTEXT_BIN_ARGS_EXTENSION_STR :
108108 self .check_extension_arg (key , value , QnnConstants .IMMUTABLE_CONTEXT_BIN_GEN_ARGS )
109109 self .qnn_config [key ] = value
@@ -191,20 +191,20 @@ def create_qnn_compiler_config_json(self) -> str:
191191 def compile (self ) -> str :
192192 """
193193 Compiles the given ``ONNX`` model during object creation using QNN compiler and saves the compiled ``qpc`` package at ``qnn_binary_dir``.
194- - Creates convertor command and convert onnx model to model.dlc using qairt-convertor
194+ - Creates converter command and convert onnx model to model.dlc using qairt-converter
195195 - command line arguments and qnn_config.json (if provided) are used to create qnn_compiler_config.json for context-binary-generator
196- - model.dlc from convertor stage is passed into context-binary-generator command to create programqpc.bin.
196+ - model.dlc from converter stage is passed into context-binary-generator command to create programqpc.bin.
197197
198198 Returns:
199199 :str: Path to compiled ``qpc`` package.
200200 """
201201 if not (
202202 self .qnn_config
203- and (QnnConstants .SKIP_QNN_CONVERTOR_STEP_STR in self .qnn_config )
204- and self .qnn_config [QnnConstants .SKIP_QNN_CONVERTOR_STEP_STR ]
203+ and (QnnConstants .SKIP_QNN_CONVERTER_STEP_STR in self .qnn_config )
204+ and self .qnn_config [QnnConstants .SKIP_QNN_CONVERTER_STEP_STR ]
205205 ):
206206 converter_cmd = self .converter ()
207- execute_command ("convertor " , converter_cmd , self .qpc_base_path )
207+ execute_command ("converter " , converter_cmd , self .qpc_base_path )
208208
209209 if not os .path .isfile (self .dlc_model_path ):
210210 raise FileNotFoundError (
@@ -225,7 +225,7 @@ def compile(self) -> str:
225225
226226 def converter (self ) -> str :
227227 """
228- Creates QNN convertor command using provided options.
228+ Creates QNN converter command using provided options.
229229
230230 IMMUTABLE parameters which can not be overridden by the user using qnn_config.json:
231231 :input_network (str): Generated ``ONNX`` Model Path.
@@ -235,10 +235,10 @@ def converter(self) -> str:
235235 :float_bitwidth (int): Converts the graph to the specified float bitwidth, either 32 or 16(Default).
236236 :preserve_io_datatype(flag): Passed by default.
237237
238- CONVERTOR_ARGS_EXTENSION passed in qnn_config.json is appended to the command created.
238+ CONVERTER_ARGS_EXTENSION passed in qnn_config.json is appended to the command created.
239239
240240 Returns:
241- :str: QNN Convertor command.
241+ :str: QNN Converter command.
242242 """
243243 converter_tool = QnnConstants .QAIRT_CONVERTER .format (self .qnn_sdk_path , self .qnn_target )
244244
@@ -250,10 +250,10 @@ def converter(self) -> str:
250250 f"--float_bitwidth { QnnConstants .FLOAT_BITWIDTH } "
251251 )
252252 # Add default arguments.
253- cmd += QnnConstants .CONVERTOR_DEFAULT_ARGS
253+ cmd += QnnConstants .CONVERTER_DEFAULT_ARGS
254254
255- if self .qnn_config and QnnConstants .CONVERTOR_ARGS_EXTENSION_STR in self .qnn_config :
256- cmd += self .qnn_config [QnnConstants .CONVERTOR_ARGS_EXTENSION_STR ]
255+ if self .qnn_config and QnnConstants .CONVERTER_ARGS_EXTENSION_STR in self .qnn_config :
256+ cmd += self .qnn_config [QnnConstants .CONVERTER_ARGS_EXTENSION_STR ]
257257
258258 return cmd
259259
@@ -266,7 +266,7 @@ def generate_context_binary(self) -> str:
266266 :backend_binary (str): Generated QPC binary file name, which is provided programqpc.bin
267267 :output_dir (str): Path to store generated Binaries (qnn_binary_dir).
268268 :model (str): Path to the <qnn_model_name.so> file containing a QNN network.
269- :dlc_path (str): Path to DLC file generated by QNN-Convertor .
269+ :dlc_path (str): Path to DLC file generated by QNN-Converter .
270270 :config_file(str): Path to created qnn_compiler_config.json containing qnn_compile_backend.json & shared_library_path.
271271
272272 Configurable parameters:
@@ -279,15 +279,13 @@ def generate_context_binary(self) -> str:
279279 """
280280 binary_gen_tool = QnnConstants .QNN_CONTEXT_BIN .format (self .qnn_sdk_path , self .qnn_target )
281281 backend_lib = QnnConstants .QNN_CONTEXT_LIB_BACKEND .format (self .qnn_sdk_path , self .qnn_target )
282- model_lib = QnnConstants .QNN_CONTEXT_LIB_MODEL .format (self .qnn_sdk_path , self .qnn_target )
283282 config_file_path = self .create_qnn_compiler_config_json ()
284283
285284 cmd = (
286285 f"{ binary_gen_tool } --binary_file { QnnConstants .CONTEXT_BIN_NAME } "
287286 f"--backend_binary { QnnConstants .CONTEXT_BIN_QPC_NAME } "
288287 f"--output_dir { self .qnn_binary_dir } "
289288 f"--backend { backend_lib } "
290- f"--model { model_lib } "
291289 f"--dlc_path { self .dlc_model_path } "
292290 f"--config_file { config_file_path } "
293291 )
@@ -343,7 +341,7 @@ def compile(
343341) -> str :
344342 """
345343 Compiles the given ``ONNX`` model using QNN compiler and saves the compiled ``qpc`` package at ``qnn_binary_dir``.
346- Generates model.dlc during convertor stage, qnn_compile_backend.json for backend parameters of context-binary-generator.
344+ Generates model.dlc during converter stage, qnn_compile_backend.json for backend parameters of context-binary-generator.
347345 Generates tensor-slicing configuration if multiple devices are passed in ``device_group``.
348346
349347 ``Mandatory`` Args:
@@ -375,7 +373,7 @@ def compile(
375373
376374 os .makedirs (qpc_base_path , exist_ok = True )
377375
378- # Created custom_io_config.yaml file for QNN-Convertor stage.
376+ # Created custom_io_config.yaml file for QNN-Converter stage.
379377 # TODO To make custom_io_config.yaml configurable as not all models need it.
380378 custom_io_file_path = os .path .join (qpc_base_path , "custom_io_config.yaml" )
381379
0 commit comments