Help Center/ Atlas 500 Application/ Software Development Guide/ Development Environment/ Setting Up the Software Development Environment
Updated on 2022-03-13 GMT+08:00

Setting Up the Software Development Environment

After obtaining the software by referring to Obtaining Software Packages and verifying the software version consistency by referring to Checking the Atlas 500 Software Version, set up the software development environment.

  1. Prepare an x86 CPU server (or PC) as the development host. Install the Ubuntu 16.04 LTS OS on the development host. (If the development host has been installed with another OS version, you can install a VM on the development host and then the Ubuntu 16.04 LTS OS for development.)

    URL for downloading the Ubuntu 16.04 LTS OS image: http://old-releases.ubuntu.com/releases/

  2. Configure the development host network and ensure that the development host and Atlas 500 are in the same LAN.
  3. Copy the software packages obtained in Obtaining Software Packages to a directory, for example /home, on the development host.
  4. Run the following command to create a directory for installing the Atlas 500 DDK, for example, /home/Atlas500_DDK:

    mkdir -p /home/Atlas500_DDK

  5. Run the following command in the directory where the A500-3000_A500-3010_A200-3000HiLens-DDK-Vx.x.x.x.tar.gz file is located to install the Atlas 500 DDK file in the created directory:

    tar -zxvf A500-3000_A500-3010_A200-3000HiLens-DDK-Vx.x.x.x.tar.gz -C /home/Atlas500_DDK

    In A500-3000_A500-3010_A200-3000HiLens-DDK-Vx.x.x.x.tar.gz, Vx.x.x.x indicates the version number.

  6. In the directory where Euler_compile_env_cross.tar.gz is located, run the following command to install the cross compilation toolchain of the Atlas 500 host to the Atlas 500 DDK installation directory:

    tar -zxvf Euler_compile_env_cross.tar.gz -C /home/Atlas500_DDK/toolchains

  7. Run the cd /home/Atlas500_DDK command to go to the Atlas 500 DDK installation directory.

    Run the cat ddk_info command to check the version of the installed Atlas 500 DDK.

  8. Run the vi ~/.bashrc command to open the environment configuration file of the current user and add the following content to the end of the file:

    export DDK_HOME=/home/Atlas500_DDK
    export PATH=$PATH:$DDK_HOME/host/bin
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DDK_HOME/host/lib

    Run the source ~/.bashrc command for the settings to take effect.

  9. Run the following commands to add a soft link to the lib64 folder in $DDK_HOME:

    cd /home/Atlas500_DDK/lib64
    ln -s libssl.so.1.1 libssl.so
    ln -s libcrypto.so.1.1 libcrypto.so
    ln -s libprotobuf.so.15 libprotobuf.so

  10. If no error is reported in the preceding steps and the following information is displayed after you run the omg -h command in a directory of the OS, the Atlas 500 development environment has been successfully set up. If the Atlas 500 development environment fails to be set up, see Getting Help.

    omg: usage: ./omg <args>
    example:
    ./omg --model=./alexnet.prototxt --weight=./alexnet.caffemodel
    --framework=0 --output=./domi
    aguments explain:
      --model             Model file
      --weight            Weight file. Required when framework is Caffe
      --framework         Framework type(0:Caffe; 3:Tensorflow)
      --output            Output file path&name(needn't suffix, will add .om automatically)
      --encrypt_mode      Encrypt flag. 0: encrypt; -1(default): not encrypt
      --encrypt_key       Encrypt_key file
      --certificate       Certificate file
      --hardware_key      ISV file
      --private_key       Private key file
      --input_shape       Shape of input data. E.g.: "input_name1:n1,c1,h1,w1;input_name2:n2,c2,h2,w2"
      --h/help            Show this help message
      --cal_conf          Calibration config file
      --insert_op_conf    Config file to insert new op
      --op_name_map       Custom op name mapping file
      --plugin_path       Custom op plugin path. Default value is: "./plugin". E.g.: "path1;path2;path3".
                          Note: A semicolon(;) cannot be included in each path, otherwise the resolved path will not match the expected one.
      --om                The model file to be converted to json
      --json              The output json file path&name which is converted from a model
      --mode              Run mode. 0(default): model => davinci; 1: framework/davinci model => json; 3: only pre-check
      --target            Target platform. (mini)
      --out_nodes         Output nodes designated by users. E.g.: "node_name1:0;node_name1:1;node_name2:0"
      --input_format      Format of input data. E.g.: "NCHW"
      --perf_level        Performance level. -1(default): generate a task-sink-model with ub-fuison and l2-fusion;
                          3: generate task-sink-model without l2-fusion; 4: task-sink-model without ub-fusion and l2-fusion.
      --check_report      The pre-checking report file. Default value is: "check_result.json"
      --input_fp16_nodes  Input node datatype is fp16 and format is NCHW. E.g.: "node_name1;node_name2"
      --is_output_fp16    Net output node datatype is fp16 and format is NCHW, or not. E.g.: "false,true,false,true"
      --ddk_version       The ddk version. E.g.: "x.y.z.Patch.B350"
      --net_format        Set net prior format. ND: select op's ND format preferentially; 5D: select op's 5D format preferentially
      --output_type       Set net output type. Support FP32 and UINT8
      --fp16_high_prec    FP16 high precision. 0(default): not use fp16 high precision; 1: use fp16 high precision