add profiler
This commit is contained in:
@@ -46,6 +46,11 @@ public:
|
||||
* @return result
|
||||
*/
|
||||
Result CreateDesc();
|
||||
|
||||
/**
|
||||
* @brief PrintDesc
|
||||
*/
|
||||
Result PrintDesc();
|
||||
|
||||
/**
|
||||
* @brief destroy desc
|
||||
@@ -59,7 +64,13 @@ public:
|
||||
* @return result
|
||||
*/
|
||||
Result CreateInput(void *inputDataBuffer, size_t bufferSize);
|
||||
|
||||
|
||||
/**
|
||||
* @brief create model input
|
||||
* @return result
|
||||
*/
|
||||
Result CreateZeroInput();
|
||||
|
||||
/**
|
||||
* @brief destroy input resource
|
||||
*/
|
||||
@@ -103,4 +114,6 @@ private:
|
||||
aclmdlDesc *modelDesc_;
|
||||
aclmdlDataset *input_;
|
||||
aclmdlDataset *output_;
|
||||
size_t numInputs_;
|
||||
size_t numOutputs_;
|
||||
};
|
||||
@@ -12,6 +12,7 @@
|
||||
#pragma once
|
||||
#include "utils.h"
|
||||
#include "acl/acl.h"
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace std;
|
||||
/**
|
||||
|
||||
@@ -21,8 +21,13 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <cstddef>
|
||||
|
||||
#define INFO_LOG(fmt, args...) fprintf(stdout, "[INFO] " fmt "\n", ##args)
|
||||
#define DEBUG_LOG(fmt, args...) fprintf(stdout, "[DEBUG] " fmt "\n", ##args)
|
||||
#define WARN_LOG(fmt, args...) fprintf(stdout, "[WARN] " fmt "\n", ##args)
|
||||
#define ERROR_LOG(fmt, args...) fprintf(stdout, "[ERROR] " fmt "\n", ##args)
|
||||
|
||||
@@ -72,6 +77,10 @@ public:
|
||||
static double InferenceTimeAverage(double *x, int len);
|
||||
|
||||
static double InferenceTimeAverageWithoutFirst(double *x, int len);
|
||||
|
||||
static void ProfilerJson(bool isprof, map<char,string>& params);
|
||||
|
||||
static void DumpJson(bool isdump, map<char,string>& params);
|
||||
};
|
||||
|
||||
#pragma once
|
||||
|
||||
Reference in New Issue
Block a user