Revert "Merge branch 'master' into tensorrt8"
This reverts commitac0d6e928e, reversing changes made to40266a6c32.
This commit is contained in:
@@ -39,7 +39,7 @@ public:
|
|||||||
float *getLabels() { return mLabels.data(); }
|
float *getLabels() { return mLabels.data(); }
|
||||||
int getBatchesRead() const { return mBatchCount; }
|
int getBatchesRead() const { return mBatchCount; }
|
||||||
int getBatchSize() const { return mBatchSize; }
|
int getBatchSize() const { return mBatchSize; }
|
||||||
nvinfer1::DimsNCHW getDims() const { return mDims; }
|
nvinfer1::Dims4 getDims() const { return mDims; }
|
||||||
float* getFileBatch() { return &mFileBatch[0]; }
|
float* getFileBatch() { return &mFileBatch[0]; }
|
||||||
float* getFileLabels() { return &mFileLabels[0]; }
|
float* getFileLabels() { return &mFileLabels[0]; }
|
||||||
void readInListFile(const std::string& dataFilePath, std::vector<std::string>& mListIn);
|
void readInListFile(const std::string& dataFilePath, std::vector<std::string>& mListIn);
|
||||||
@@ -55,7 +55,7 @@ private:
|
|||||||
int mFileBatchPos{ 0 };
|
int mFileBatchPos{ 0 };
|
||||||
int mImageSize{ 0 };
|
int mImageSize{ 0 };
|
||||||
|
|
||||||
nvinfer1::DimsNCHW mDims;
|
nvinfer1::Dims4 mDims;
|
||||||
std::vector<float> mBatch;
|
std::vector<float> mBatch;
|
||||||
std::vector<float> mLabels;
|
std::vector<float> mLabels;
|
||||||
std::vector<float> mFileBatch;
|
std::vector<float> mFileBatch;
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ public:
|
|||||||
Int8EntropyCalibrator(BatchStream& stream, int firstBatch, const std::string& calibTableFilePath,
|
Int8EntropyCalibrator(BatchStream& stream, int firstBatch, const std::string& calibTableFilePath,
|
||||||
const std::string& inputBlobName, bool readCache = true);
|
const std::string& inputBlobName, bool readCache = true);
|
||||||
virtual ~Int8EntropyCalibrator() { checkCuda(cudaFree(mDeviceInput)); }
|
virtual ~Int8EntropyCalibrator() { checkCuda(cudaFree(mDeviceInput)); }
|
||||||
int getBatchSize() const override { return mStream.getBatchSize(); }
|
int getBatchSize() const NOEXCEPT override { return mStream.getBatchSize(); }
|
||||||
bool getBatch(void* bindings[], const char* names[], int nbBindings) override;
|
bool getBatch(void* bindings[], const char* names[], int nbBindings) NOEXCEPT override;
|
||||||
const void* readCalibrationCache(size_t& length) override;
|
const void* readCalibrationCache(size_t& length) NOEXCEPT override;
|
||||||
void writeCalibrationCache(const void* cache, size_t length) override;
|
void writeCalibrationCache(const void* cache, size_t length) NOEXCEPT override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BatchStream mStream;
|
BatchStream mStream;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ namespace tk { namespace dnn {
|
|||||||
using namespace nvinfer1;
|
using namespace nvinfer1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class NetworkRT {
|
class NetworkRT {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -56,7 +57,6 @@ public:
|
|||||||
dnnType *output;
|
dnnType *output;
|
||||||
cudaStream_t stream;
|
cudaStream_t stream;
|
||||||
|
|
||||||
PluginFactory *pluginFactory;
|
|
||||||
|
|
||||||
NetworkRT(Network *net, const char *name);
|
NetworkRT(Network *net, const char *name);
|
||||||
virtual ~NetworkRT();
|
virtual ~NetworkRT();
|
||||||
|
|||||||
@@ -78,4 +78,4 @@ namespace nvinfer1 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_TENSORRT_PLUGIN(ActivationReLUCeilingPluginCreator);
|
REGISTER_TENSORRT_PLUGIN(ActivationReLUCeilingPluginCreator);
|
||||||
};
|
};
|
||||||
@@ -107,4 +107,4 @@ namespace nvinfer1 {
|
|||||||
REGISTER_TENSORRT_PLUGIN(RegionRTPluginCreator);
|
REGISTER_TENSORRT_PLUGIN(RegionRTPluginCreator);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -94,4 +94,5 @@ namespace nvinfer1 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_TENSORRT_PLUGIN(ReorgRTPluginCreator);
|
REGISTER_TENSORRT_PLUGIN(ReorgRTPluginCreator);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -99,4 +99,4 @@ namespace nvinfer1 {
|
|||||||
|
|
||||||
REGISTER_TENSORRT_PLUGIN(ReshapeRTPluginCreator);
|
REGISTER_TENSORRT_PLUGIN(ReshapeRTPluginCreator);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@@ -101,3 +101,4 @@ namespace nvinfer1 {
|
|||||||
|
|
||||||
REGISTER_TENSORRT_PLUGIN(ResizeLayerRTPluginCreator);
|
REGISTER_TENSORRT_PLUGIN(ResizeLayerRTPluginCreator);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -121,4 +121,4 @@ namespace nvinfer1 {
|
|||||||
|
|
||||||
REGISTER_TENSORRT_PLUGIN(YoloRTPluginCreator);
|
REGISTER_TENSORRT_PLUGIN(YoloRTPluginCreator);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "cuda_runtime_api.h"
|
#include "cuda_runtime_api.h"
|
||||||
#include <cublas_v2.h>
|
#include <cublas_v2.h>
|
||||||
#include <cudnn.h>
|
#include <cudnn.h>
|
||||||
|
#include <NvInferVersion.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
@@ -23,6 +24,15 @@
|
|||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if NV_TENSORRT_MAJOR > 7
|
||||||
|
#define NOEXCEPT noexcept
|
||||||
|
#else
|
||||||
|
#define NOEXCEPT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define dnnType float
|
#define dnnType float
|
||||||
|
|
||||||
template<typename T> void writeBUF(char*& buffer, const T& val)
|
template<typename T> void writeBUF(char*& buffer, const T& val)
|
||||||
|
|||||||
Reference in New Issue
Block a user