cyrusbehr / tensorrt-cpp-api

TensorRT C++ API Tutorial
MIT License
543 stars 66 forks source link

[feature] Add support for non-float output types #38

Closed cyrusbehr closed 3 months ago

cyrusbehr commented 6 months ago

Float output type is currently hard coded (with respect to allocation and copying of output buffer). Use m_engine->getTensorDataType(tensorName); to get the datatype of the output. Allocate memory appropriately. Copy output to a generic output byte buffer, which then supports method for obtaining pointer as a specific type.

cyrusbehr commented 3 months ago

Implemented in https://github.com/cyrusbehr/tensorrt-cpp-api/pull/53