Tool/software:
Hi,
I would like to utilize the options of compilation with acceleration for the manual mixed precision of my model. I already tried 'FeatureExtractor/MobilenetV2/Conv/Relu6' and 'Relu6' but i still have the same error.
At this link https://github.com/TexasInstruments/edgeai-tidl-tools/tree/master/examples/osrt_python#user-options-for-tidl-acceleration, the information given is 'Comma separated string';
What are the expected values for those parameters : 'advanced_options:params_16bit_names_list' and 'advanced_options:output_feature_16bit_names_list' ? May I have an example?
Here is my code that is run on TI's cloud :
# Make a dictionary of labels and class values label_dict = make_label_dict('ssd_mobilenet_v2_300/labels.txt') tflite_model_path ='ssd_mobilenet_v2_300/ssd_mobilenet_v2_300_float.tflite' output_dir = 'custom-artifacts_8b_16b_mixed1' compile_options = { 'tidl_tools_path' : os.environ['TIDL_TOOLS_PATH'], 'artifacts_folder' : output_dir, 'tensor_bits' : 8, 'accuracy_level' : 1, 'advanced_options:calibration_frames' : len(calib_images), 'advanced_options:calibration_iterations' : 16, 'advanced_options:params_16bit_names_list': 'FeatureExtractor/MobilenetV2/Conv/Relu6', 'advanced_options:output_feature_16bit_names_list': 'FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6', } # create the output dir if not preset # clear the directory if not os.path.exists(output_dir): os.makedirs(output_dir, exist_ok=True) for root, dirs, files in os.walk(output_dir, topdown=False): [os.remove(os.path.join(root, f)) for f in files] [os.rmdir(os.path.join(root, d)) for d in dirs] tidl_delegate = [tflite.load_delegate(os.path.join(os.environ['TIDL_TOOLS_PATH'], 'tidl_model_import_tflite.so'), compile_options)] interpreter = tflite.Interpreter(model_path=tflite_model_path, experimental_delegates=tidl_delegate) interpreter.allocate_tensors() input_details = interpreter.get_input_details() output_details = interpreter.get_output_details()
Here is the output log:
Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1295.20 .... ..... ... .... ..... # 1 . .. T 1248.98 .... ..... ... .... ..... # 2 . .. T 1346.37 .... ..... ... .... ..... # 3 . .. T 1254.34 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1299.71 .... ..... ... .... ..... # 1 . .. T 1290.21 .... ..... ... .... ..... # 2 . .. T 1264.15 .... ..... ... .... ..... # 3 . .. T 1256.26 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1515.81 .... ..... ... .... ..... # 1 . .. T 1344.55 .... ..... ... .... ..... # 2 . .. T 1353.69 .... ..... ... .... ..... # 3 . .. T 1301.77 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1339.12 .... ..... ... .... ..... # 1 . .. T 1338.15 .... ..... ... .... ..... # 2 . .. T 1359.92 .... ..... ... .... ..... # 3 . .. T 1240.54 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1254.99 .... ..... ... .... ..... # 1 . .. T 1381.06 .... ..... ... .... ..... # 2 . .. T 1243.00 .... ..... ... .... ..... # 3 . .. T 1224.57 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1492.42 .... ..... ... .... ..... # 1 . .. T 1239.00 .... ..... ... .... ..... # 2 . .. T 1226.89 .... ..... ... .... ..... # 3 . .. T 1245.04 .... ..... ... .... .....V2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/Conv/Relu6 Invalid Layer Name FeatureExtractor/MobilenetV2/expanded_conv/depthwise/Relu6 Empty prototxt path, running calibration ~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~ ***************** Calibration iteration number 0 started ************************ Empty prototxt path, running calibration ~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~ ***************** Calibration iteration number 0 completed ************************ ***************** Calibration iteration number 1 started ************************ Empty prototxt path, running calibration ~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~ ***************** Calibration iteration number 1 completed ************************ ***************** Calibration iteration number 2 started ************************ Empty prototxt path, running calibration ~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~ ***************** Calibration iteration number 2 completed ************************ ***************** Calibration iteration number 3 started ************************ Empty prototxt path, running calibration ~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~ ***************** Calibration iteration number 3 completed ************************ ***************** Calibration iteration number 4 started ************************ Empty prototxt path, running calibration ~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~ ***************** Calibration iteration number 4 completed ************************ ***************** Calibration iteration number 5 started ************************ Empty prototxt path, running calibration ~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~ ***************** Calibration iteration number 5 completed ************************ ***************** Calib Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1234.49 .... ..... ... .... ..... # 1 . .. T 1245.26 .... ..... ... .... ..... # 2 . .. T 1240.04 .... ..... ... .... ..... # 3 . .. T 1238.82 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1239.30 .... ..... ... .... ..... # 1 . .. T 1231.06 .... ..... ... .... ..... # 2 . .. T 1232.40 .... ..... ... .... ..... # 3 . .. T 1228.57 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1249.43 .... ..... ... .... ..... # 1 . .. T 1229.47 .... ..... ... .... ..... # 2 . .. T 1236.71 .... ..... ... .... ..... # 3 . .. T 1238.14 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1230.97 .... ..... ... .... ..... # 1 . .. T 1230.83 .... ..... ... .... ..... # 2 . .. T 1259.41 .... ..... ... .... ..... # 3 . .. T 1233.59 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1240.51 .... ..... ... .... ..... # 1 . .. T 1255.22 .... ..... ... .... ..... # 2 . .. T 1225.32 .... ..... ... .... ..... # 3 . .. T 1225.76 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1237.23 .... ..... ... .... ..... # 1 . .. T 1227.63 .... ..... ... .... ..... # 2 . .. T 1225.13 .... ..... ... .... ..... # 3 . .. T 1228.18 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1360.47 .... ..... ... .... ..... # 1 . .. T 1263.00 .... ..... ... .... ..... # 2 . .. T 1290.71 .... ..... ... .... ..... # 3 . .. T 1276.46 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1309.94 .... ..... ... .... ..... # 1 . .. T 1273.22 .... ..... ... .... ..... # 2 . .. T 1314.62 .... ..... ... .... ..... # 3 . .. T 1365.85 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1284.03 .... ..... ... .... ..... # 1 . .. T 1282.19 .... ..... ... .... ..... # 2 . .. T 1259.46 .... ..... ... .... ..... # 3 . .. T 1262.29 .... ..... ... .... ..... Processing config file #0 : /home/root/notebooks/J7AI_HelloWorld_Webinar_3q21/HelloWorld_PC_Cloud_TDA4VM_SK_EVM_v2/custom-artifacts_8b_16b_mixed1/tempDir/264_tidl_io_.qunat_stats_config.txt Freeing memory for user provided Net ----------------------- TIDL Process with REF_ONLY FLOW ------------------------ # 0 . .. T 1553.84 .... ..... ... .... ..... # 1 . .. T 1413.89 .... ..... ... .... ..... # 2 . .. T 1220.74 .... ..... ... .... ..... # 3 . .. T 1242.73 .... ..... ... .... ..... ------------------ Network Compiler Traces ----------------------------- successful Memory allocation successful Workload Creation 100% 4/4 [05:36<00:00, 84.04s/it]
Regards,
Azer