Forums - snpe-udo-package-generator error on v1.66 SDK

1 post / 0 new
snpe-udo-package-generator error on v1.66 SDK
yangji_njau
Join Date: 8 Feb 23
Posts: 6
Posted: Mon, 2024-05-20 20:02

When I create a custom operator according to the UDO tutorial in the document, I encounter the following error:

snpe-udo-package-generator -p $SNPE_ROOT/examples/NativeCpp/UdoExample/Softmax/config/Softmax.json -o $SNPE_ROOT/models/inception_v3/
2024-05-20 18:38:22,210 - 214 - INFO - Creating new package at: ./snpe-1.66.0.3729/models/inception_v3/SoftmaxUdoPackage
2024-05-20 18:38:22,211 - 219 - WARNING - DSP Operation detected but HEXAGON_SDK_ROOT is not set. Please note HEXAGON_SDK_ROOT needs to be set to compile the package.
Traceback (most recent call last):
  File "./snpe-1.66.0.3729/bin/x86_64-linux-clang/snpe-udo-package-generator", line 35, in <module>
    config_path=args.config_path)
  File "./snpe-1.66.0.3729/lib/python/qti/aisw/converters/backend/custom_ops/snpe_udo_config.py", line 243, in setup_file_paths
    self.copy_udo_dir("utils", CUSTOM_OP_DIR, cpu_util_src_dir)
NameError: name 'CUSTOM_OP_DIR' is not defined

Looking at the lib/python/qti/aisw/converters/backend/custom_ops/snpe_udo_config.py,  It looks like I need to set the env "QNN_SDK_ROOT" , then the variable 'CUSTOM_OP_DIR' will be set.

QNN_SDK_ROOT = os.getenv("QNN_SDK_ROOT")

if QNN_SDK_ROOT is not None:
    SHARE_LOC_PREFIX = os.path.join(os.path.abspath(QNN_SDK_ROOT), 'target', 'x86_64-linux-clang', 'share', 'OpPackageGenerator')
    CUSTOM_OP_DIR = os.path.join(SHARE_LOC_PREFIX, 'CustomOp')
Downgrading the version to 1.61 can address this bug, but i have to use version 1.66 due to some reasons.
 
Any ideas?
Thanks 

 

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.