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-J722S:如何使用 onnxrt_ep.py 确认转换的模型的重量类型?

Guru**** 2457760 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1478903/processor-sdk-j722s-how-can-i-confirm-the-weight-type-of-the-model-converted-using-onnxrt_ep-py

器件型号:PROCESSOR-SDK-J722S

工具与软件:

嗨、团队:

我尝试使用 /edgeai-tidl-tools/examples/osrt_python/ort/onnxrt_ep.py 将模型转换为 TIDL 格式(TIDL 10.00.08.00)、然后运行推理。

但过程时间不符合预期。

如何使用 onnxrt_ep.py 确认模型转换的重量类型?

感谢您的帮助。

此致、

肯尼亚

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Ken:

    我不是100%肯定你在问什么。  编译 选项位于 ort 目录(包含 onnxrt_ep.py 的目录)中的 model_configs.py 文件中。 如果将权重类型表示为每个值的位数、则在该文件中设置 tensor_bits。  请访问: https://github.com/TexasInstruments/edgeai-tidl-tools/blob/master/examples/osrt_python/README.md

    此外、还有一个脚本:

    https://github.com/TexasInstruments/edgeai-tidl-tools/blob/master/docs/tidl_osr_debug.md

    我在几周前尝试过它、您必须对其进行修改、因为它不起作用 OOB、但它可让您大致了解 int 位与 float 的对齐情况。  如果输出的数据看起来是这样的、则量化值和浮点值很接近。  

    此致、

    Chris

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    大家好、

    很抱歉因我的个人休假而延迟回复。

    我用自己的模型进行测试,并尝试设置tensor_bits = 816,但推理过程时间大致相同(35mS )。

    从理论上讲、处理时间是否应该存在差异?

    但是、我还测试了另一个芯片(2TOPS)、并且其推理过程时间比 TDA4更快(~20ms)。

    因此、我想问: 我如何才能确认转换的模型onnxrt_ep.py确实是8位模型?

    感谢您的帮助。

    此致、
    Ken

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    大家好、 :  

    抱歉、我想确认是否tensor_bits在中设置model_configs.py。 例如、在以下代码中:

    optional_options=AttrDict( debug_level= 6, tensor_bits= 8 )

    Is this where tensor_bits is configured?

    Thanks for your kindly help.
    Best Regards,
    Ken

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Ken:

    tensor_bits 可在 common_utils.py 中找到和配置。  

    这是如果使用 advanced_examples 而不是 osrt_python/ort/。 如果使用 osrt_python/ort、则可在 model_configs.py 中找到配置。

    希望这对您有所帮助。

    此致、

    Christina