Environment Setup

  • Before UDF development, you need to install the driver firmware and Ascend-CANN-Toolkit. For details, see CANN Software Installation Guide.
  • Before developing a UDF with Python, you need to install the Python dependency packages pybind11 and Jinja2. pybind11 is used to convert objects between C++ and Python. Jinja2 is used to quickly generate a project template.
  • Configure the environment variable CANN package installation path ASCEND_INSTALL_PATH. During UDF compilation, search for the dependent header file and .so file based on this environment variable. If it is not set, the environment variable /usr/local/Ascend is used by default. A configuration example is provided as follows:
    export ASCEND_INSTALL_PATH=CANN package installation path