From b5f99aabb0087fadfdc45256a3d9d055b62b299a Mon Sep 17 00:00:00 2001 From: Xuan Hien Date: Wed, 30 Nov 2022 23:07:31 +0700 Subject: [PATCH] Fix --- .../efficientNMSCustomInference.cu | 16 ++++++++-------- .../efficientNMSLandmarkInference.cu | 16 ++++++++-------- plugin/roIAlignPlugin/roIAlignPlugin.h | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/plugin/efficientNMSCustomPlugin/efficientNMSCustomInference.cu b/plugin/efficientNMSCustomPlugin/efficientNMSCustomInference.cu index 5952daa3..4798db2a 100644 --- a/plugin/efficientNMSCustomPlugin/efficientNMSCustomInference.cu +++ b/plugin/efficientNMSCustomPlugin/efficientNMSCustomInference.cu @@ -590,11 +590,11 @@ pluginStatus_t EfficientNMSCustomDispatch(EfficientNMSCustomParameters param, co void* nmsClassesOutput, void* nmsIndicesOutput, void* workspace, cudaStream_t stream) { // Clear Outputs (not all elements will get overwritten by the kernels, so safer to clear everything out) - CSC(cudaMemsetAsync(numDetectionsOutput, 0x00, param.batchSize * sizeof(int), stream)); - CSC(cudaMemsetAsync(nmsScoresOutput, 0x00, param.batchSize * param.numOutputBoxes * sizeof(T), stream)); - CSC(cudaMemsetAsync(nmsBoxesOutput, 0x00, param.batchSize * param.numOutputBoxes * 4 * sizeof(T), stream)); - CSC(cudaMemsetAsync(nmsClassesOutput, 0x00, param.batchSize * param.numOutputBoxes * sizeof(int), stream)); - CSC(cudaMemsetAsync(nmsIndicesOutput, 0xFF, param.batchSize * param.numOutputBoxes * sizeof(int), stream)); + CSC(cudaMemsetAsync(numDetectionsOutput, 0x00, param.batchSize * sizeof(int), stream), STATUS_FAILURE); + CSC(cudaMemsetAsync(nmsScoresOutput, 0x00, param.batchSize * param.numOutputBoxes * sizeof(T), stream), STATUS_FAILURE); + CSC(cudaMemsetAsync(nmsBoxesOutput, 0x00, param.batchSize * param.numOutputBoxes * 4 * sizeof(T), stream), STATUS_FAILURE); + CSC(cudaMemsetAsync(nmsClassesOutput, 0x00, param.batchSize * param.numOutputBoxes * sizeof(int), stream), STATUS_FAILURE); + CSC(cudaMemsetAsync(nmsIndicesOutput, 0xFF, param.batchSize * param.numOutputBoxes * sizeof(int), stream), STATUS_FAILURE); // Empty Inputs if (param.numScoreElements < 1) @@ -610,7 +610,7 @@ pluginStatus_t EfficientNMSCustomDispatch(EfficientNMSCustomParameters param, co int* topOffsetsEndData = topNumData + 2 * param.batchSize; int* outputIndexData = topNumData + 3 * param.batchSize; int* outputClassData = topNumData + 4 * param.batchSize; - CSC(cudaMemsetAsync(topNumData, 0x00, countersTotalSize * sizeof(int), stream)); + CSC(cudaMemsetAsync(topNumData, 0x00, countersTotalSize * sizeof(int), stream), STATUS_FAILURE); cudaError_t status = cudaGetLastError(); CSC(status, STATUS_FAILURE); @@ -633,9 +633,9 @@ pluginStatus_t EfficientNMSCustomDispatch(EfficientNMSCustomParameters param, co // Device Specific Properties int device; - CSC(cudaGetDevice(&device)); + CSC(cudaGetDevice(&device), STATUS_FAILURE); struct cudaDeviceProp properties; - CSC(cudaGetDeviceProperties(&properties, device)); + CSC(cudaGetDeviceProperties(&properties, device), STATUS_FAILURE); if (properties.regsPerBlock >= 65536) { // Most Devices diff --git a/plugin/efficientNMSLandmarkPlugin/efficientNMSLandmarkInference.cu b/plugin/efficientNMSLandmarkPlugin/efficientNMSLandmarkInference.cu index 33628734..457d559b 100644 --- a/plugin/efficientNMSLandmarkPlugin/efficientNMSLandmarkInference.cu +++ b/plugin/efficientNMSLandmarkPlugin/efficientNMSLandmarkInference.cu @@ -598,11 +598,11 @@ pluginStatus_t EfficientNMSLandmarkDispatch(EfficientNMSLandmarkParameters param cudaStream_t stream) { // Clear Outputs (not all elements will get overwritten by the kernels, so safer to clear everything out) - CSC(cudaMemsetAsync(numDetectionsOutput, 0x00, param.batchSize * sizeof(int), stream)); - CSC(cudaMemsetAsync(nmsScoresOutput, 0x00, param.batchSize * param.numOutputBoxes * sizeof(T), stream)); - CSC(cudaMemsetAsync(nmsBoxesOutput, 0x00, param.batchSize * param.numOutputBoxes * 4 * sizeof(T), stream)); - CSC(cudaMemsetAsync(nmsClassesOutput, 0x00, param.batchSize * param.numOutputBoxes * sizeof(int), stream)); - CSC(cudaMemsetAsync(nmsLandmarksOutput, 0x00, param.batchSize * param.numOutputBoxes * 10 * sizeof(T), stream)); + CSC(cudaMemsetAsync(numDetectionsOutput, 0x00, param.batchSize * sizeof(int), stream), STATUS_FAILURE); + CSC(cudaMemsetAsync(nmsScoresOutput, 0x00, param.batchSize * param.numOutputBoxes * sizeof(T), stream), STATUS_FAILURE); + CSC(cudaMemsetAsync(nmsBoxesOutput, 0x00, param.batchSize * param.numOutputBoxes * 4 * sizeof(T), stream), STATUS_FAILURE); + CSC(cudaMemsetAsync(nmsClassesOutput, 0x00, param.batchSize * param.numOutputBoxes * sizeof(int), stream), STATUS_FAILURE); + CSC(cudaMemsetAsync(nmsLandmarksOutput, 0x00, param.batchSize * param.numOutputBoxes * 10 * sizeof(T), stream), STATUS_FAILURE); // Empty Inputs if (param.numScoreElements < 1) @@ -618,7 +618,7 @@ pluginStatus_t EfficientNMSLandmarkDispatch(EfficientNMSLandmarkParameters param int* topOffsetsEndData = topNumData + 2 * param.batchSize; int* outputIndexData = topNumData + 3 * param.batchSize; int* outputClassData = topNumData + 4 * param.batchSize; - CSC(cudaMemsetAsync(topNumData, 0x00, countersTotalSize * sizeof(int), stream)); + CSC(cudaMemsetAsync(topNumData, 0x00, countersTotalSize * sizeof(int), stream), STATUS_FAILURE); cudaError_t status = cudaGetLastError(); CSC(status, STATUS_FAILURE); @@ -642,9 +642,9 @@ pluginStatus_t EfficientNMSLandmarkDispatch(EfficientNMSLandmarkParameters param // Device Specific Properties int device; - CSC(cudaGetDevice(&device)); + CSC(cudaGetDevice(&device), STATUS_FAILURE); struct cudaDeviceProp properties; - CSC(cudaGetDeviceProperties(&properties, device)); + CSC(cudaGetDeviceProperties(&properties, device), STATUS_FAILURE); if (properties.regsPerBlock >= 65536) { // Most Devices diff --git a/plugin/roIAlignPlugin/roIAlignPlugin.h b/plugin/roIAlignPlugin/roIAlignPlugin.h index 5b669e69..5d873e23 100644 --- a/plugin/roIAlignPlugin/roIAlignPlugin.h +++ b/plugin/roIAlignPlugin/roIAlignPlugin.h @@ -88,7 +88,7 @@ class RoIAlignDynamicPlugin : public IPluginV2DynamicExt bool mAligned; }; -class RoIAlignBasePluginCreator : public BaseCreator +class RoIAlignBasePluginCreator : public nvinfer1::pluginInternal::BaseCreator { public: RoIAlignBasePluginCreator() noexcept;