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.

TDA4VM: compile option for custom model?

Part Number: TDA4VM

Dear Champs,

My customer is trying to compile their custom AI model to evaluate it on TDA4VM EVM and wants to know if they need to modify 'model_confgs' file and 'model_configs' definition in 'common_utils.py'file.

Could you please check and guide me how they can set it for their custom AI model?

And also, what 'delegate_options' should be set to compile their custom AI model in below?

    elif args.compile:

        EP_list = ['TIDLCompilationProvider','CPUExecutionProvider']

        sess = rt.InferenceSession(config['model_path'] ,providers=EP_list, provider_options=[delegate_options, {}], sess_options=so)

Thanks and Best Regards,

SI.

  • Hi SI,

    To compile custom model, customer needs to add a new model_config similar to the existing ones in "model_configs" dictionary. They can change the "model_path" and "source" based on their model. If model_path does not contain the model, it is downloaded from "model_url" specified in "source", and if "opt" is True, the pre-processing for mean and standard deviation is absorbed within the model for faster execution on C7x-MMA. "Infer_shape" is set to True for any new downloaded ONNX model as TIDL - ONNXRT expects shape inference to be run on model. If model is not downloaded from source, customer should run shape inference on model before running the script.

    For user options, please ask customer to refer to the following documentation : https://github.com/TexasInstruments/edgeai-tidl-tools/tree/master/examples/osrt_python#user-options-for-tflite-and-onnx-runtime

    Let me note here that the scripts as part of edgeai_tidl_tools are just example scripts we provide customers to help get started up and they are free to modify them based on their applications.

    Feel free to continue thread if there are any further questions.

    Regards,

    Anand