来自于开发者手册
Q: How do I use TensorRT on multiple GPUs?
如何在多GPU环境中使用TensorRT
A: Each ICudaEngine object is bound to a specific GPU when it is instantiated, either
by the builder or on deserialization. To select the GPU, use cudaSetDevice() before
calling the builder or deserializing the engine. Each IExecutionContext is bound
to the same GPU as the engine from which it was created. When calling execute()
or enqueue(), ensure that the thread is associated with the correct device by calling
cudaSetDevice() if necessary
每个ICudaEngine对象被实例化的时候(builder 或者deserialization)都会绑定在指定的GPU上。如果要选择GPU, 则应该在创建engine或者反序列化engine的时候使用cudaSetDevice()进行设定。每一个IExecutionContext都被绑定在了engine被创建的那个GPU上。当使用execute()或者enqueue() 需要明确与当前显卡有关的线程
博客围绕在多GPU环境中使用TensorRT展开。指出每个ICudaEngine对象实例化时会绑定特定GPU,可在创建或反序列化engine时用cudaSetDevice()选择GPU,每个IExecutionContext绑定创建它的GPU,调用execute()或enqueue()时必要需用cudaSetDevice()明确线程关联的设备。
2381

被折叠的 条评论
为什么被折叠?



