Installation and Uninstallation Based on a Kernel Package

The following uses the kernel package with the default name as an example. Replace it with the actual kernel package name during actual running.

  • Install the kernel package of the debug build.
    Go to the directory where the debug_kernel_${datatime}.run package is stored and run the package as the running user (for example, HwHiAiUser).
    ./debug_kernel_${datatime}.run

    If you see information similar to the following, the installation is successful.

    1
    installation complete.
    

    Currently, the installation directory cannot be specified. By default, the .run package is installed in ${install_path}/opp/debug_kernel. ${install_path} indicates the CANN component directory.

    The default installation path ${install_path}/opp/debug_kernel of the .run package uses the default permission 755. If the kernel package of the debug version fails to be installed due to lack of permission, contact the installation user of the CANN package to modify the permission on the debug_kernel directory.

    The following is an example of the directory structure after the .run package is installed:
    |-- ${install_path}/opp/debug_kernel
    	|-- ascendxxxx
            |   |-- gelu # Binary directory of the operator.
    	|       |-- Gelu_5c5e58e043224cccf51a06108010ae13_high_precision.json
    	|       |-- Gelu_5c5e58e043224cccf51a06108010ae13_high_precision.o
    	|-- config
    	|   |-- ascendxxxx
            |       |-- binary_info_config.json  # Indexes of all kernel packages.
    	|       |-- gelu.json # Index of the operator kernel.
    	|-- scripts # Common scripts involved in the tool.
    	|   |-- common.py
    	|   |-- help.info
    	|   |-- install.py
    	|   |-- uninstall.py
            |-- uninstall.sh # Script for uninstallation.
    	|-- version.info # Version information.

    If multiple kernel packages are installed, the kernel package installed later will overwrite the existing kernel package.

  • Uninstall the kernel package.

    Go to the directory where the debug_kernel_${datatime}.run package is installed and run uninstall.sh as the running user (for example, HwHiAiUser).

    cd ${install_path}/opp/debug_kernel
    ./uninstall.sh

    If the uninstallation is successful, the debug_kernel folder will be deleted.