Skip to content

A tutorial for getting started on running Tensorrt engine and Deep Learning Accelerator (DLA) models on threads

Notifications You must be signed in to change notification settings

PrinceP/tensorrt-sample-on-threads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tensorrt sample for running engines on different threads

Here is a sample to run GPU and DLAs at the same time.

  1. Prepare TensorRT engine of GPU and DLA with trtexec. For example

For GPU

trtexec --onnx=/usr/src/tensorrt/data/mnist/mnist.onnx --saveEngine=gpu.engine

For DLA

trtexec --onnx=/usr/src/tensorrt/data/mnist/mnist.onnx --useDLACore=0 --allowgPUFallback --saveEngine=dla.engine
  1. Compile the repo
make
  1. Test

Please put the gu.engine and da.engine generated in step l to the cloned repo.

The command runs like this

./test <thread0> <thread1> <thread2> ... <threadK> # -1: GPU, 0: DLAO, 1: DLA1

Ex: Run GPU+DLA0+DLA1

./test -1 0 1

About

A tutorial for getting started on running Tensorrt engine and Deep Learning Accelerator (DLA) models on threads

Topics

Resources

Stars

Watchers

Forks