Skip to content

Commit ca507e8

Browse files
committed
pre-commit
1 parent fdfbefd commit ca507e8

17 files changed

+1137
-1276
lines changed

yolov8/yolov8_trt10/include/block.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,29 @@
77

88
std::map<std::string, nvinfer1::Weights> loadWeights(const std::string file);
99

10-
nvinfer1::IScaleLayer *addBatchNorm2d(nvinfer1::INetworkDefinition *network,
11-
std::map<std::string, nvinfer1::Weights> weightMap,
12-
nvinfer1::ITensor &input, std::string lname, float eps);
10+
nvinfer1::IScaleLayer* addBatchNorm2d(nvinfer1::INetworkDefinition* network,
11+
std::map<std::string, nvinfer1::Weights> weightMap, nvinfer1::ITensor& input,
12+
std::string lname, float eps);
1313

14-
nvinfer1::IElementWiseLayer *convBnSiLU(nvinfer1::INetworkDefinition *network,
15-
std::map<std::string, nvinfer1::Weights> weightMap, nvinfer1::ITensor &input,
14+
nvinfer1::IElementWiseLayer* convBnSiLU(nvinfer1::INetworkDefinition* network,
15+
std::map<std::string, nvinfer1::Weights> weightMap, nvinfer1::ITensor& input,
1616
int ch, int k, int s, int p, std::string lname);
1717

18-
nvinfer1::IElementWiseLayer *C2F(nvinfer1::INetworkDefinition *network,
19-
std::map<std::string, nvinfer1::Weights> weightMap, nvinfer1::ITensor &input, int c1,
18+
nvinfer1::IElementWiseLayer* C2F(nvinfer1::INetworkDefinition* network,
19+
std::map<std::string, nvinfer1::Weights> weightMap, nvinfer1::ITensor& input, int c1,
2020
int c2, int n, bool shortcut, float e, std::string lname);
2121

22-
nvinfer1::IElementWiseLayer *C2(nvinfer1::INetworkDefinition *network,
23-
std::map<std::string, nvinfer1::Weights> &weightMap, nvinfer1::ITensor &input, int c1,
22+
nvinfer1::IElementWiseLayer* C2(nvinfer1::INetworkDefinition* network,
23+
std::map<std::string, nvinfer1::Weights>& weightMap, nvinfer1::ITensor& input, int c1,
2424
int c2, int n, bool shortcut, float e, std::string lname);
2525

26-
nvinfer1::IElementWiseLayer *SPPF(nvinfer1::INetworkDefinition *network,
27-
std::map<std::string, nvinfer1::Weights> weightMap, nvinfer1::ITensor &input, int c1,
26+
nvinfer1::IElementWiseLayer* SPPF(nvinfer1::INetworkDefinition* network,
27+
std::map<std::string, nvinfer1::Weights> weightMap, nvinfer1::ITensor& input, int c1,
2828
int c2, int k, std::string lname);
2929

30-
nvinfer1::IShuffleLayer *DFL(nvinfer1::INetworkDefinition *network, std::map<std::string, nvinfer1::Weights> weightMap,
31-
nvinfer1::ITensor &input, int ch, int grid, int k, int s, int p, std::string lname);
30+
nvinfer1::IShuffleLayer* DFL(nvinfer1::INetworkDefinition* network, std::map<std::string, nvinfer1::Weights> weightMap,
31+
nvinfer1::ITensor& input, int ch, int grid, int k, int s, int p, std::string lname);
3232

33-
nvinfer1::IPluginV2Layer *addYoLoLayer(nvinfer1::INetworkDefinition *network,
34-
std::vector<nvinfer1::IConcatenationLayer *> dets, const int *px_arry,
33+
nvinfer1::IPluginV2Layer* addYoLoLayer(nvinfer1::INetworkDefinition* network,
34+
std::vector<nvinfer1::IConcatenationLayer*> dets, const int* px_arry,
3535
int px_arry_num, bool is_segmentation, bool is_pose);

yolov8/yolov8_trt10/include/calibrator.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
//! \brief Implements Entropy calibrator 2.
1212
//! CalibrationAlgoType is kENTROPY_CALIBRATION_2.
1313
//!
14-
class Int8EntropyCalibrator2 : public nvinfer1::IInt8EntropyCalibrator2
15-
{
16-
public:
17-
Int8EntropyCalibrator2(int batchsize, int input_w, int input_h, const char* img_dir, const char* calib_table_name, const char* input_blob_name, bool read_cache = true);
14+
class Int8EntropyCalibrator2 : public nvinfer1::IInt8EntropyCalibrator2 {
15+
public:
16+
Int8EntropyCalibrator2(int batchsize, int input_w, int input_h, const char* img_dir, const char* calib_table_name,
17+
const char* input_blob_name, bool read_cache = true);
1818
virtual ~Int8EntropyCalibrator2();
1919
int getBatchSize() const TRT_NOEXCEPT override;
2020
bool getBatch(void* bindings[], const char* names[], int nbBindings) TRT_NOEXCEPT override;
2121
const void* readCalibrationCache(size_t& length) TRT_NOEXCEPT override;
2222
void writeCalibrationCache(const void* cache, size_t length) TRT_NOEXCEPT override;
2323

24-
private:
24+
private:
2525
int batchsize_;
2626
int input_w_;
2727
int input_h_;
@@ -36,4 +36,4 @@ class Int8EntropyCalibrator2 : public nvinfer1::IInt8EntropyCalibrator2
3636
std::vector<char> calib_cache_;
3737
};
3838

39-
#endif // ENTROPY_CALIBRATOR_H
39+
#endif // ENTROPY_CALIBRATOR_H

yolov8/yolov8_trt10/include/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
const static char* kInputTensorName = "images";
66
const static char* kOutputTensorName = "output";
7-
const static char *kProtoTensorName = "proto";
7+
const static char* kProtoTensorName = "proto";
88
const static int kNumClass = 80;
99
const static int kPoseNumClass = 1;
1010
const static int kNumberOfPoints = 17; // number of keypoints total

yolov8/yolov8_trt10/include/cuda_utils.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
#include <cuda_runtime_api.h>
55

66
#ifndef CUDA_CHECK
7-
#define CUDA_CHECK(callstr)\
8-
{\
9-
cudaError_t error_code = callstr;\
10-
if (error_code != cudaSuccess) {\
11-
std::cerr << "CUDA error " << error_code << " at " << __FILE__ << ":" << __LINE__;\
12-
assert(0);\
13-
}\
7+
#define CUDA_CHECK(callstr) \
8+
{ \
9+
cudaError_t error_code = callstr; \
10+
if (error_code != cudaSuccess) { \
11+
std::cerr << "CUDA error " << error_code << " at " << __FILE__ << ":" << __LINE__; \
12+
assert(0); \
13+
} \
1414
}
1515
#endif // CUDA_CHECK
1616

1717
#endif // TRTX_CUDA_UTILS_H_
18-

0 commit comments

Comments
 (0)