Browse Source

Fix bug.

tags/v1.3.0
zhaozhixuan 4 years ago
parent
commit
cd9869c99d
2 changed files with 5 additions and 5 deletions
  1. +4
    -4
      ge/common/ge/tbe_plugin_manager.cc
  2. +1
    -1
      ge/common/ge/tbe_plugin_manager.h

+ 4
- 4
ge/common/ge/tbe_plugin_manager.cc View File

@@ -105,11 +105,11 @@ void TBEPluginManager::ProcessSoFullName(vector<string> &file_list, string &caff
}

void TBEPluginManager::FindParserSo(const string &path, vector<string> &file_list,
string &caffe_parser_path, uint32_t recursive_depth) {
static const uint32_t max_recursive_depth = 20; // For recursive depth protection
string &caffe_parser_path, int recursive_depth) {
static const int kMaxRecursiveDepth = 20; // For recursive depth protection

if (recursive_depth >= max_recursive_depth) {
GELOGW("Recursive depth is become %u, Please check input!", recursive_depth);
if (recursive_depth >= kMaxRecursiveDepth) {
GELOGW("Recursive depth is become %d, Please check input!", recursive_depth);
return;
}



+ 1
- 1
ge/common/ge/tbe_plugin_manager.h View File

@@ -58,7 +58,7 @@ class TBEPluginManager {
const string &caffe_parser_so_suff, const string &aicpu_so_suff,
const string &aicpu_host_so_suff);
static void FindParserSo(const string &path, vector<string> &file_list, string &caffe_parser_path,
uint32_t recursive_depth = 0);
int32_t recursive_depth = 0);
static void GetPluginSoFileList(const string &path, vector<string> &file_list, string &caffe_parser_path);
static void GetCustomOpPath(std::string &customop_path);
void LoadCustomOpLib();


Loading…
Cancel
Save