Revert "Merge branch 'master' into tensorrt8"

This reverts commit ac0d6e928e, reversing
changes made to 40266a6c32.
This commit is contained in:
perseusdg
2022-04-06 17:40:20 -04:00
parent ac0d6e928e
commit a336126733
10 changed files with 24 additions and 12 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::DimsNCHW getDims() const { return mDims; }
nvinfer1::Dims4 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::DimsNCHW mDims;
nvinfer1::Dims4 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 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;
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;
private:
BatchStream mStream;
+1 -1
View File
@@ -33,6 +33,7 @@ namespace tk { namespace dnn {
using namespace nvinfer1;
class NetworkRT {
public:
@@ -56,7 +57,6 @@ 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
+2 -1
View File
@@ -94,4 +94,5 @@ 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,3 +101,4 @@ 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,6 +13,7 @@
#include "cuda_runtime_api.h"
#include <cublas_v2.h>
#include <cudnn.h>
#include <NvInferVersion.h>
#ifdef __linux__
@@ -23,6 +24,15 @@
#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)