提交 765c9d35 编写于 作者: M Megvii Engine Team

fix(mgb/trt): change log level of trt log

GitOrigin-RevId: 5f5495e303e4a78b02ad78f3f9ee6a725009ef52
上级 dbe2b893
......@@ -72,13 +72,13 @@ void TensorRTOpr::Logger::log(nvinfer1::ILogger::Severity severity,
const char* msg) {
switch (severity) {
case Severity::kINTERNAL_ERROR:
mgb_log_error("TRT_INTERNAL_ERROR: %s", msg);
mgb_log("TRT_INTERNAL_ERROR: %s", msg);
return;
case Severity::kERROR:
mgb_log_error("TRT_ERROR: %s", msg);
mgb_log("TRT_ERROR: %s", msg);
return;
case Severity::kWARNING:
mgb_log_warn("TRT_WARNING: %s", msg);
mgb_log("TRT_WARNING: %s", msg);
return;
case Severity::kINFO:
mgb_log_debug("TRT_INFO: %s", msg);
......@@ -167,7 +167,7 @@ void TensorRTManager::exec(cg::SingleCNOperatorNodeBase* opr,
CompNode comp_node_check,
nvinfer1::ICudaEngine* engine,
size_t batch) {
auto comp_node = opr->comp_node();
// ICudaEngine is bound to the currently active device
comp_node.activate();
......@@ -360,7 +360,7 @@ SymbolVarArray TensorRTOpr::make(
std::shared_ptr<nvinfer1::INetworkDefinition> network,
TensorRTGraphFeatureBits feature_bits,
std::shared_ptr<GpuAllocator> gpu_allocator, const SymbolVarArray& src,
std::shared_ptr<nvinfer1::ICudaEngine> engine,
std::shared_ptr<nvinfer1::ICudaEngine> engine,
const OperatorNodeConfig& config) {
VarNodeArray var_node_array = cg::to_var_node_array(src);
auto tensor_rt_opr = std::make_unique<TensorRTOpr>(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册