This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-J721S2: edgeai-tiovx-apps: Expose dl_block output pad as graph parameter

Part Number: PROCESSOR-SDK-J721S2

Tool/software:

Hi,

I am working on edgeai-tiovx-apps and for multiple models inference, the application initializes a new dl_block for each model. Each dl_block->output_pad is connected to the output_block->input_pads list that will be later used by mosiac_node to display the results.

I am developing an application on top of edgeai-tiovx-apps in which I am running two models. In this application, I only want to show the output of one model on the display, while just using the inference results of other model. For this, I want to expose the output_pad of dl_block as graph parameter. 

Hence, I would like to know how I can expose the dl_block->output_pad as graph parameter in the connect_blocks function in app.c? 

Thanks,

Ahmed

  • Hi Ahmed,

    I am redirecting your question to the proper engineer. Thank you for your patience.

    -Fabiana

  • Hi Ahmed,

    Typically the graph parameters are achieved by using the tee nodes in edgeai-tiovx-apps. 

    Are you already using the same? You can find the usage of tee in the sample demo apps.

    Regards,

    Nikhil

  • Hi Nikhil,

    Thanks for the response.

    Are you already using the same?

    I was trying to put dl_block->output_pad = NULL, similar to the display node output for RTOS Display from "edgeai-tiovx-apps/apps/src/output_block.c" file.

    #if !defined(SOC_AM62A) && !defined(SOC_J722S)
        /* RTOS_DISPLAY */
        if(output_info->sink == RTOS_DISPLAY)
        {
            TIOVXDisplayNodeCfg display_cfg;
            NodeObj *display_node = NULL;
    
            tiovx_display_init_cfg(&display_cfg);
    
            display_cfg.width = output_info->width;
            display_cfg.height = output_info->height;
            display_cfg.params.outWidth  = output_info->width;
            display_cfg.params.outHeight = output_info->height;
            display_cfg.params.posX = (1920 - output_info->width)/2;
            display_cfg.params.posY = (1080 - output_info->height)/2;
    
            display_node = tiovx_modules_add_node(graph,
                                                  TIOVX_DISPLAY,
                                                  (void *)&display_cfg);
    
            /* Link Mosaic to Display */
            tiovx_modules_link_pads(output_pad, &display_node->sinks[0]);
    
            output_pad = NULL;
        }
    #endif
    
        output_block->output_pad = output_pad;
    
        return status;
    }

    As you can see that "output_block->output_pad = output_pad", the "output pad = NULL".

    I tried to implement the same logic to dl_block->output_pad, but the application freezes in the "app.c" while loop, in which it cannot dequeue the buf_pool of input pad of input block.

    in_buf_pool = input_blocks[i].input_pad->buf_pool;
    inbuf = tiovx_modules_dequeue_buf(in_buf_pool);      // the program stops here

    Can you let me know why input block got affected when I put the dl_block->output_pad = NULL of one model while the other is connected to the input pad of output block?

    Thanks,

    Ahmed

  • Hi Ahmed,

    Whenever a pad is left unconnected it becomes a graph parameter

    For your use case I suggest writing a separate app instead of modifying existing app

    Please take a look at simple tests we have, which are easy to follow and take reference from

    edgeai-tiovx-apps/tests/app_tiovx_dl_pipeline_test.c at develop · TexasInstruments/edgeai-tiovx-apps (github.com)

    Regards
    Rahul T R

  • Thanks Rahul for the valuable suggestion and sharing the information!

    Regards,

    Ahmed

  • Not suggest Run edgeai-tiovx-apps On PROCESSOR-SDK-J721S2.You can Run it on edgeai SDK.

  • Sorry, did not understand your concern here

    Regards,

    Nikhil