Fix the sorting kernels used in the CenterNet pre and post-processing.
This commit moves the kernels in the correct sub-directory. It creates new header file for Thrust kernels. It splits the kernels into two files: 'normalize.cu' contains CenterNet pre-processing operations, 'postprocessing.cu' contains the CenterNet post-processing operations. Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "DetectionNN.h"
|
||||
|
||||
#include "sorting.h"
|
||||
#include "kernelsThrust.h"
|
||||
|
||||
|
||||
namespace tk { namespace dnn {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#ifndef SORTING_H
|
||||
#define SORTING_H
|
||||
#ifndef KERNELSTHRUST_H
|
||||
#define KERNELSTHRUST_H
|
||||
|
||||
|
||||
#include <thrust/sort.h>
|
||||
#include <thrust/execution_policy.h>
|
||||
@@ -9,7 +10,6 @@
|
||||
#include <thrust/gather.h>
|
||||
#include <thrust/copy.h>
|
||||
|
||||
|
||||
#include "tkdnn.h"
|
||||
|
||||
struct threshold : public thrust::binary_function<float,float,float>
|
||||
@@ -27,7 +27,7 @@ struct threshold : public thrust::binary_function<float,float,float>
|
||||
void sort(dnnType *src_begin, dnnType *src_end, int *idsrc);
|
||||
void topk(dnnType *src_begin, int *idsrc, int K, float *topk_scores,
|
||||
int *topk_inds, float *topk_ys, float *topk_xs);
|
||||
void sortAndTopKonDevice(dnnType *src_begin, int *idsrc, float *topk_scores, int *topk_inds, float *topk_ys, float *topk_xs, const int size, const int K, const int n_classes);
|
||||
// void sortAndTopKonDevice(dnnType *src_begin, int *idsrc, float *topk_scores, int *topk_inds, float *topk_ys, float *topk_xs, const int size, const int K, const int n_classes);
|
||||
void normalize(float *bgr, const int ch, const int h, const int w, const float *mean, const float *stddev);
|
||||
void subtractWithThreshold(dnnType *src_begin, dnnType *src_end, dnnType *src2_begin, dnnType *src_out, struct threshold op);
|
||||
void topKxyclasses(int *ids_begin, int *ids_end, const int K, const int size, const int wh, int *clses, int *xs, int *ys);
|
||||
@@ -36,4 +36,4 @@ void topKxyAddOffset(int * ids_begin, const int K, const int size, int *intxs_be
|
||||
void bboxes(int * ids_begin, const int K, const int size, float *xs_begin, float *ys_begin,
|
||||
dnnType *src_begin, float *bbx0, float *bbx1, float *bby0, float *bby1, float *src_out, int *ids_out);
|
||||
|
||||
#endif /*SORTING_H*/
|
||||
#endif //KERNELSTHRUST_H
|
||||
Reference in New Issue
Block a user