原文
The Engine interface allows the application to execute inference. It supports synchronous and asynchronous execution, profiling, and enumeration and querying of the bindings for the engine inputs and outputs. A single-engine can have multiple execution contexts, allowing a single set of trained parameters to be used for the simultaneous execution of multiple batches. For more information about the Engine, see Execution API
翻译
Engine接口允许应用执行前向。Engine接口支持同步和异步执行,支持对自我的解剖分析(就是分析模型每一层的运行情况,比如说时间等),支持枚举和查询engine绑定的输入输出。每个engine可以有多个 execution contexts, 这就使得一份训练的参数,可以同时执行多个batch(注,这和batchsize设置大一点有什么不同?)
解析
- Engine接口支持同步和异步执行(指的是 异步
context.enqueue
和同步的context.execute
) - 支持对自我的解剖分析(详细分析模型每一层的运行情况,比如说时间等,见文章对于IProfiler的应用)
- 支持枚举和查询engine绑定的输入输出。
- 每个engine可以有多个 execution contexts,