"src/turbomind/utils/gemm_test/t5_gemm_func.h" did not exist on "720fc533da804ac3f46ee938864403e51fcd9fa7"
CommonUtility.h 848 Bytes
Newer Older
lijian6's avatar
lijian6 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// 常用工具

#ifndef __COMMON_UTILITY_H__
#define __COMMON_UTILITY_H__

#include <mutex>
#include <string>
#include <vector>
#include <CommonDefinition.h>
#include <migraphx/onnx.hpp>
#include <migraphx/gpu/target.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/quantization.hpp>

using namespace std;

namespace migraphxSamples
{

 string GetCurrentTimeString();
 std::vector<string> SplitString(string str,std::string separator);

// 排序规则: 按照置信度或者按照面积排序
 bool CompareConfidence(const ResultOfDetection &L,const ResultOfDetection &R);
 bool CompareArea(const ResultOfDetection &L,const ResultOfDetection &R);

 void NMS(std::vector<ResultOfDetection> &detections, float IOUThreshold);

 migraphx::parameter_map CreateParameterMap(migraphx::program & p);

}

#endif //