使用 Onnxruntime 时使用不同的硬件加速器执行 NN 模型图的不同操作

发布于 2025-01-09 12:23:34 字数 240 浏览 7 评论 0原文

我试图通过 OnnxRuntime 利用 NNAPI 在 Android 设备上进行 NN 模型推理。基于此处的 YouTube 视频:https://www.youtube.com/watch?v=Ij5MoUnLQ0E 可以为模型中的算子指定硬件加速器。任何有关如何继续进行的指导将不胜感激。

I was trying to utilize NNAPI via OnnxRuntime for NN model inferencing on an Android device. Based on the youtube video here: https://www.youtube.com/watch?v=Ij5MoUnLQ0E it is possible to specify the hardware accelerators for operators in the model. Any guidance on how to proceed with that would be grateful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

琴流音 2025-01-16 12:23:34

在 NNAPI 中,可以发现存在哪些硬件加速器,并选择特定的硬件加速器来运行模型。

如果应用程序指定多个加速器,NNAPI 运行时将根据每个加速器的特性及其支持的层来划分工作。

程序不可能逐层做出该决定。如果这就是您所需要的,您可能必须将模型分解为子模型。

有关更多详细信息,请参阅 NNAPI 文档中的设备发现和分配部分。

我对 OnnxRuntime 不熟悉。我不知道这个包是否公开了该功能。

In NNAPI, it is possible to discover which hardware accelerators are present, and to select specific ones for running a model.

If the application specifies more than one accelerator, the NNAPI runtime partitions the work depending on the characteristics of each accelerator and the layers they support.

It is not possible for a program to make that decision on a layer by layer basis. If that's what you need, you may have to break down your model into sub-models.

See the Device discovery and assignment section in the NNAPI documentation for more details.

I am not familiar with OnnxRuntime. I don't know if this package exposes that functionality.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文