HSim.so - version compatibility? Python 3.12 expected

HSim.so: undefined symbol: _ZN10tensorflow15OpKernelContext21CtxFailureWithWarningEPKciRKN3tsl6StatusE

Which version of tensorflow does hailo_dataflow_compiler use? And what can be downloaded for hailo_dataflow_compiler is only Python 3.10 compatible , I’m expecting Python 3.12 …

Thank you

Hi @jiapei,
The installed Tensorflow version in the Dataflow Compiler’s (DFC) .whl file is 2.12.0.
The checked Python versions for the DFC package are 3.8, 3.9, 3.10. t might work for Python 3.12, but it was not tested for it so we cannot guarantee it will.

Regards,

It looks the DFC is specifically for x86 ?

And, the following is happening on my x86_64 desktop Ubuntu:

➜  Desktop hailomz compile yolov8s --hw-arch hailo8l                                                          
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1730830600.644933 2792838 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1730830600.649901 2792838 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
<Hailo Model Zoo INFO> Start run for network yolov8s ...
<Hailo Model Zoo INFO> Initializing the hailo8l runner...
Traceback (most recent call last):
  File "~/.local/bin/hailomz", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "~/.local/lib/python3.12/site-packages/hailo_model_zoo/main.py", line 122, in main
    run(args)
  File "~/.local/lib/python3.12/site-packages/hailo_model_zoo/main.py", line 111, in run
    return handlers[args.command](args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.local/lib/python3.12/site-packages/hailo_model_zoo/main_driver.py", line 248, in compile
    runner = ClientRunner(hw_arch=args.hw_arch, har=args.har_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.local/lib/python3.12/site-packages/hailo_sdk_client/runner/client_runner.py", line 130, in __init__
    HSimWrapper().load()
  File "~/.local/lib/python3.12/site-packages/hailo_sdk_common/paths_manager/SimWrapper.py", line 15, in load
    self._load()
  File "~/.local/lib/python3.12/site-packages/hailo_sdk_common/paths_manager/SimWrapper.py", line 19, in _load
    self._hsim = tf.load_op_library(hsim_path)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.local/lib/python3.12/site-packages/tensorflow/python/framework/load_library.py", line 54, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tensorflow.python.framework.errors_impl.NotFoundError: ~/.local/lib/python3.12/site-packages/hailo_sdk_client/emulator/emulator/lib/HSim.so: undefined symbol: _ZN10tensorflow15OpKernelContext21CtxFailureWithWarningEPKciRKN3tsl6StatusE
➜  Desktop pip show tensorflow
Name: tensorflow
Version: 2.18.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: [email protected]
License: Apache 2.0
Location: ~/.local/lib/python3.12/site-packages
Requires: absl-py, astunparse, flatbuffers, gast, google-pasta, grpcio, h5py, keras, libclang, ml-dtypes, numpy, opt-einsum, packaging, protobuf, requests, setuptools, six, tensorboard, termcolor, typing-extensions, wrapt
Required-by: 
➜  Desktop pip show tflite 
Name: tflite
Version: 2.10.0
Summary: Parsing TensorFlow Lite Models (*.tflite) Easily
Home-page: https://zhenhuaw.me/tflite
Author: 王振华(Zhenhua WANG)
Author-email: [email protected]
License: Apache License 2.0
Location: /home/lvision/.local/lib/python3.12/site-packages
Requires: flatbuffers, numpy
Required-by: 

And also:

➜  Desktop pip install tensorflow==2.12.0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement tensorflow==2.12.0 (from versions: 2.16.0rc0, 2.16.1, 2.16.2, 2.17.0rc0, 2.17.0rc1, 2.17.0, 2.17.1, 2.18.0rc0, 2.18.0rc1, 2.18.0rc2, 2.18.0)
ERROR: No matching distribution found for tensorflow==2.12.0

My Desktop now is already of Python 3.12. Even on Raspberry Pi 5, the Python is of version 3.11.2 already.

Can Hailo Group upgrade the DFC ??? I’m expecting the support for:

  • Python: 3.11 and 3.12
  • x86_64, and aarch64

Cheers

Hi @jiapei,
It seems that the issue is indeed because of the Python version. Support for Python 3.11 and 3.12 will be available in the future, but for now in order for it to work you’ll have to downgrade your Python version.

Regards,

When will the support for 3.12 be ?
And, also, is there a plan for DFC to be able to be deployed on aarch64???

Hi @jiapei,
The plan is to have it supported in Q1 (January) of 2025 or in Q2 (April).
I don’t believe that supporting DFC in aarch64 is currently not in the road plans, but I’ll take it to the R&D for task evaluation.

Regards,

1 Like

With the source, it shouldn’t be an issue in just a couple of days anyway… Hmmmmm…
Still have to wait for a while… :slight_smile: