I tried to create a "nonzero" operator. I folloed the UDO guide. After create the udo config file, I used the tool snpe-udo-package-generator to create udo package. But I failed with the followed error:
2022-12-29 15:33:15,225 - 219 - WARNING - Force generation is set. Deleting existing udo Package at /home/.../work/SNPE/models/MyCustomUdoPackageTraceback (most recent call last):File "/home/.../work/SNPE/snpe-1.68.0.3932/bin/x86_64-linux-clang/snpe-udo-package-generator", line 35, in <module>config_path=args.config_path)File "/home/.../work/SNPE/snpe-1.68.0.3932/lib/python/qti/aisw/converters/backend/custom_ops/snpe_udo_config.py", line 243, in setup_file_pathsself.copy_udo_dir("utils", CUSTOM_OP_DIR, cpu_util_src_dir)NameError: name 'CUSTOM_OP_DIR' is not defined
if "CPU" in udo_package.supported_runtimes:cpu_root = os.path.join(src_dir, 'CPU')cpu_src_dir = os.path.join(cpu_root, 'src')cpu_util_src_dir = os.path.join(cpu_src_dir, 'utils')self.copy_udo_dir("utils", CUSTOM_OP_DIR, cpu_util_src_dir)self.make_udo_dir(os.path.join(cpu_src_dir, 'ops'))
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')
Dear developer,
The QNN SDK is no need to set to SNPE. Could you please share you conversion commands to us?
BR.
Wei
It seems like there is a bug starting from SNPE 1.62. Running with SNPE 1.61 fixed the problem for me
Did you find another solution for this apart from downgrade? I am using
snpe-udo-package-generator --config_path /data/octavf/trilu.json --output_path /data/octavf/triluUDOPack
And it crashes for same path missing from
/opt/qcom/aistack/snpe/2.12.0.230626/lib/python/qti/aisw/converters/backend/custom_ops/snpe_udo_config.py