Skip to content
Snippets Groups Projects
Commit 428273ae authored by Nathan Thoumine's avatar Nathan Thoumine
Browse files

remove support for old version of Tensor RT

parent d13f356f
No related branches found
No related tags found
No related merge requests found
...@@ -20,17 +20,9 @@ public: ...@@ -20,17 +20,9 @@ public:
CHECK_CUDA_STATUS(cudaFree(mDeviceInput)); CHECK_CUDA_STATUS(cudaFree(mDeviceInput));
} }
int getBatchSize() const int getBatchSize() const override { return mStream.getBatchSize(); }
#if NV_TENSORRT_MAJOR > 7
noexcept
#endif
override { return mStream.getBatchSize(); }
bool getBatch(void* bindings[], const char* names[], int nbBindings) bool getBatch(void* bindings[], const char* names[], int nbBindings) override
#if NV_TENSORRT_MAJOR > 7
noexcept
#endif
override
{ {
if (!mStream.next()) if (!mStream.next())
{ {
...@@ -42,11 +34,7 @@ public: ...@@ -42,11 +34,7 @@ public:
return true; return true;
} }
const void* readCalibrationCache(size_t& length) const void* readCalibrationCache(size_t& length) override
#if NV_TENSORRT_MAJOR > 7
noexcept
#endif
override
{ {
mCalibrationCache.clear(); mCalibrationCache.clear();
std::ifstream input(calibrationTableName(), std::ios::binary); std::ifstream input(calibrationTableName(), std::ios::binary);
...@@ -59,11 +47,7 @@ public: ...@@ -59,11 +47,7 @@ public:
return length ? &mCalibrationCache[0] : nullptr; return length ? &mCalibrationCache[0] : nullptr;
} }
virtual void writeCalibrationCache(const void* cache, size_t length) virtual void writeCalibrationCache(const void* cache, size_t length) override
#if NV_TENSORRT_MAJOR > 7
noexcept
#endif
override
{ {
std::ofstream output(calibrationTableName(), std::ios::binary); std::ofstream output(calibrationTableName(), std::ios::binary);
output.write(reinterpret_cast<const char*>(cache), length); output.write(reinterpret_cast<const char*>(cache), length);
...@@ -80,4 +64,4 @@ private: ...@@ -80,4 +64,4 @@ private:
std::string mCalibrationCacheName; std::string mCalibrationCacheName;
void* mDeviceInput{nullptr}; void* mDeviceInput{nullptr};
std::vector<char> mCalibrationCache; std::vector<char> mCalibrationCache;
}; };
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment