Merge branch 'master' into tensorrt8

This commit is contained in:
Harshvardhan Chandirasekar
2022-04-06 17:06:27 -04:00
committed by GitHub
10 changed files with 12 additions and 24 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ public:
float *getLabels() { return mLabels.data(); }
int getBatchesRead() const { return mBatchCount; }
int getBatchSize() const { return mBatchSize; }
nvinfer1::Dims4 getDims() const { return mDims; }
nvinfer1::DimsNCHW getDims() const { return mDims; }
float* getFileBatch() { return &mFileBatch[0]; }
float* getFileLabels() { return &mFileLabels[0]; }
void readInListFile(const std::string& dataFilePath, std::vector<std::string>& mListIn);
@@ -55,7 +55,7 @@ private:
int mFileBatchPos{ 0 };
int mImageSize{ 0 };
nvinfer1::Dims4 mDims;
nvinfer1::DimsNCHW mDims;
std::vector<float> mBatch;
std::vector<float> mLabels;
std::vector<float> mFileBatch;
+4 -4
View File
@@ -30,10 +30,10 @@ public:
Int8EntropyCalibrator(BatchStream& stream, int firstBatch, const std::string& calibTableFilePath,
const std::string& inputBlobName, bool readCache = true);
virtual ~Int8EntropyCalibrator() { checkCuda(cudaFree(mDeviceInput)); }
int getBatchSize() const NOEXCEPT override { return mStream.getBatchSize(); }
bool getBatch(void* bindings[], const char* names[], int nbBindings) NOEXCEPT override;
const void* readCalibrationCache(size_t& length) NOEXCEPT override;
void writeCalibrationCache(const void* cache, size_t length) NOEXCEPT override;
int getBatchSize() const override { return mStream.getBatchSize(); }
bool getBatch(void* bindings[], const char* names[], int nbBindings) override;
const void* readCalibrationCache(size_t& length) override;
void writeCalibrationCache(const void* cache, size_t length) override;
private:
BatchStream mStream;
+1 -1
View File
@@ -33,7 +33,6 @@ namespace tk { namespace dnn {
using namespace nvinfer1;
class NetworkRT {
public:
@@ -57,6 +56,7 @@ public:
dnnType *output;
cudaStream_t stream;
PluginFactory *pluginFactory;
NetworkRT(Network *net, const char *name);
virtual ~NetworkRT();
@@ -78,4 +78,4 @@ namespace nvinfer1 {
};
REGISTER_TENSORRT_PLUGIN(ActivationReLUCeilingPluginCreator);
};
};
+1 -1
View File
@@ -107,4 +107,4 @@ namespace nvinfer1 {
REGISTER_TENSORRT_PLUGIN(RegionRTPluginCreator);
};
#endif
#endif
+1 -2
View File
@@ -94,5 +94,4 @@ namespace nvinfer1 {
};
REGISTER_TENSORRT_PLUGIN(ReorgRTPluginCreator);
};
};
+1 -1
View File
@@ -99,4 +99,4 @@ namespace nvinfer1 {
REGISTER_TENSORRT_PLUGIN(ReshapeRTPluginCreator);
};
#endif
#endif
-1
View File
@@ -101,4 +101,3 @@ namespace nvinfer1 {
REGISTER_TENSORRT_PLUGIN(ResizeLayerRTPluginCreator);
};
+1 -1
View File
@@ -121,4 +121,4 @@ namespace nvinfer1 {
REGISTER_TENSORRT_PLUGIN(YoloRTPluginCreator);
};
#endif
#endif
-10
View File
@@ -13,7 +13,6 @@
#include "cuda_runtime_api.h"
#include <cublas_v2.h>
#include <cudnn.h>
#include <NvInferVersion.h>
#ifdef __linux__
@@ -24,15 +23,6 @@
#include <chrono>
#if NV_TENSORRT_MAJOR > 7
#define NOEXCEPT noexcept
#else
#define NOEXCEPT
#endif
#define dnnType float
template<typename T> void writeBUF(char*& buffer, const T& val)