Skip to content

Using tf_to_trt_image_classification with DLA support #41

@cmehrshad

Description

@cmehrshad

I have modified uff_to_plan.cpp to use DLA on Xavier Using the following function:

inline void enableDLA(IBuilder* b, int dlaID)
{
    b->allowGPUFallback(true);
    b->setFp16Mode(true);
    b->setDefaultDeviceType(static_cast<DeviceType>(dlaID));
}

The output is:

./build/examples/classify_image/classify_image data/images/gordon_setter.jpg data/plans/inception_v1.plan data/imagenet_labels_1001.txt input InceptionV1/Logits/SpatialSqueeze inception
Loading TensorRT engine from plan file...
Preprocessing input...
Executing inference engine...

The top-5 indices are: 215 235 166 214 213
Which corresponds to class labels:
0. Gordon setter

  1. Rottweiler
  2. black-and-tan coonhound
  3. Irish setter, red setter
  4. English setter
    dla/eglUtils.cpp (121) - EGL Error in validateEglStream: 12289
    terminate called after throwing an instance of 'nvinfer1::EglError'
    what(): std::exception
    Aborted (core dumped)

Do you have a clue how can I use DLA with this project?
Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions