mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
Remove debug code (#266)
* Rename Frontend to ModelFormat in documents * Remove useless debug flag
This commit is contained in:
@@ -54,30 +54,15 @@ class FASTDEPLOY_DECL FastDeployModel {
|
||||
}
|
||||
|
||||
virtual std::map<std::string, float> PrintStatisInfoOfRuntime();
|
||||
virtual void EnableDebug();
|
||||
virtual bool DebugEnabled();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Runtime> runtime_;
|
||||
bool runtime_initialized_ = false;
|
||||
// whether to record inference time
|
||||
bool enable_record_time_of_runtime_ = false;
|
||||
bool debug_ = false;
|
||||
|
||||
// record inference time for backend
|
||||
std::vector<double> time_of_runtime_;
|
||||
};
|
||||
|
||||
#define TIMERECORD_START(id) \
|
||||
TimeCounter tc_##id; \
|
||||
tc_##id.Start();
|
||||
|
||||
#define TIMERECORD_END(id, prefix) \
|
||||
if (DebugEnabled()) { \
|
||||
tc_##id.End(); \
|
||||
FDLogger() << __FILE__ << "(" << __LINE__ << "):" << __FUNCTION__ << " " \
|
||||
<< prefix << " duration = " << tc_##id.Duration() << "s." \
|
||||
<< std::endl; \
|
||||
}
|
||||
|
||||
} // namespace fastdeploy
|
||||
|
Reference in New Issue
Block a user