Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make torchair -j8时报错error: ‘const struct gert::Shape’ has no member named ‘GetDims’ #1

Open
StubbornCalf opened this issue Sep 16, 2024 · 2 comments

Comments

@StubbornCalf
Copy link

完整的代码

[  3%] Built target ascend_protobuf
[  8%] Built target fmk_parser
[ 10%] Copy pthon files
[ 15%] Built target acl_tdt_channel
[ 20%] Built target acl_op_compiler
[ 25%] Built target graph
[ 31%] Built target acl_stub
[ 36%] Built target hccl_stub
[ 41%] Built target ascendcl
[ 46%] Built target hccl
[ 51%] Built target ge_local_stub
[ 56%] Built target ge_runner
Consolidate compiler generated dependencies of target _abi_compat_ge_apis
[ 56%] Building CXX object torchair/abi_compat_ge_apis/CMakeFiles/_abi_compat_ge_apis.dir/compat_apis.cpp.o
[ 56%] Built target copy_pyfiles
[ 60%] Built target torch_npu_local_stub
[ 65%] Built target torch_npu
/home/HwHiAiUser/project/torchair/torchair/abi_compat_ge_apis/compat_apis.cpp: In function ‘tng::Status tng::compat::DebugString(const gert::Shape&):
/home/HwHiAiUser/project/torchair/torchair/abi_compat_ge_apis/compat_apis.cpp:142:21: error: ‘const struct gert::Shape’ has no member named ‘GetDims’; did you mean ‘GetDim’?
  142 |   auto dims = shape.GetDims();
      |                     ^~~~~~~
      |                     GetDim
make[3]: *** [torchair/abi_compat_ge_apis/CMakeFiles/_abi_compat_ge_apis.dir/build.make:76: torchair/abi_compat_ge_apis/CMakeFiles/_abi_compat_ge_apis.dir/compat_apis.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:812: torchair/abi_compat_ge_apis/CMakeFiles/_abi_compat_ge_apis.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:675: CMakeFiles/torchair.dir/rule] Error 2
make: *** [Makefile:403: torchair] Error 2

请问如何解决呢?

@StubbornCalf
Copy link
Author

按照他的路径把Getdim部分的代码删除

/*
Status DebugString(const ge::Shape &shape) {
  std::stringstream ss;
  auto dims = shape.GetDims();
  if (dims.empty()) {
    return Status::Error("[]");
  }
  ss << "[";
  size_t index = 0U;
  for (; index < (dims.size() - 1U); index++) {
    ss << dims[index] << ", ";
  }
  ss << dims[index] << "]";
  return Status::Error(ss.str().c_str());
}

Status DebugString(const gert::Shape &shape) {
  auto dims = shape.GetDims();
  if (dims.empty()) {
    return Status::Error("[]");
  }
  std::stringstream ss;
  ss << "[";
  size_t index = 0U;
  for (; index < (dims.size() - 1U); index++) {
    ss << dims[index] << ", ";
  }
  ss << dims[index] << "]";
  return Status::Error(ss.str().c_str());
}
*/





Status DebugString(const ge::Shape &shape) {
  std::stringstream ss;
  ss << "[" << "]";
  return Status::Error(ss.str().c_str());
}

Status DebugString(const gert::Shape &shape) {
  std::stringstream ss;
  ss << "[" << "]";
  return Status::Error(ss.str().c_str());
}

之后继续编译,还是报错

[  5%] Built target acl_tdt_channel
[  8%] Built target ascend_protobuf
[ 13%] Built target graph
[ 18%] Built target fmk_parser
[ 24%] Built target acl_stub
[ 29%] Built target acl_op_compiler
[ 34%] Built target hccl_stub
[ 36%] Copy pthon files
[ 41%] Built target ascendcl
[ 46%] Built target ge_local_stub
[ 51%] Built target hccl
[ 56%] Built target ge_runner
Consolidate compiler generated dependencies of target _abi_compat_ge_apis
[ 56%] Building CXX object torchair/abi_compat_ge_apis/CMakeFiles/_abi_compat_ge_apis.dir/compat_apis.cpp.o
[ 56%] Built target copy_pyfiles
[ 60%] Built target torch_npu_local_stub
[ 65%] Built target torch_npu
[ 67%] Linking CXX shared library ../../dist/torchair/core/_abi_compat_ge_apis.so
[ 67%] Built target _abi_compat_ge_apis
[ 68%] Building CXX object torchair/CMakeFiles/_torchair.dir/concrete_graph/executor.cpp.o
[ 70%] Building CXX object torchair/CMakeFiles/_torchair.dir/concrete_graph/concrete_graph.cpp.o
[ 72%] Building CXX object torchair/CMakeFiles/_torchair.dir/cann_ir_ability/cann_ir_ability.cpp.o
[ 72%] Building CXX object torchair/CMakeFiles/_torchair.dir/concrete_graph/hdc_channel.cpp.o
[ 74%] Building CXX object torchair/CMakeFiles/_torchair.dir/concrete_graph/npu_aoe.cpp.o
[ 75%] Building CXX object torchair/CMakeFiles/_torchair.dir/concrete_graph/export.cpp.o
[ 77%] Building CXX object torchair/CMakeFiles/_torchair.dir/concrete_graph/session.cpp.o
[ 79%] Building CXX object torchair/CMakeFiles/_torchair.dir/concrete_graph/tng_status.cpp.o
In file included from /home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:8:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:15:41: error: ‘GeSessionLoadGraph’ was not declared in this scope
   15 | using GeSessionLoadGraphFunc = decltype(GeSessionLoadGraph);
      |                                         ^~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:15:41: error: ‘GeSessionLoadGraph’ was not declared in this scope
/home/HwHiAiUser/project/torchair/torchair/include/session.h:16:41: error: ‘GeSessionExecuteGraphWithStreamAsync’ was not declared in this scope
   16 | using GeFastExecuteGraphFunc = decltype(GeSessionExecuteGraphWithStreamAsync);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:16:41: error: ‘GeSessionExecuteGraphWithStreamAsync’ was not declared in this scope
/home/HwHiAiUser/project/torchair/torchair/include/session.h:74:3: error: ‘GeSessionLoadGraphFunc’ does not name a type
   74 |   GeSessionLoadGraphFunc *fast_load_graph_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:75:3: error: ‘GeFastExecuteGraphFunc’ does not name a type
   75 |   GeFastExecuteGraphFunc *fast_execute_graph_async_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h: In member function ‘bool tng::Session::IsFastLoadGraphSupported() const’:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:54:12: error: ‘fast_load_graph_’ was not declared in this scope; did you mean FastLoadGraph’?
   54 |     return fast_load_graph_ != nullptr;
      |            ^~~~~~~~~~~~~~~~
      |            FastLoadGraph
/home/HwHiAiUser/project/torchair/torchair/include/session.h: In member function ‘bool tng::Session::IsFastExecuteGraphSupported() const’:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:58:12: error: ‘fast_execute_graph_async_’ was not declared in this scope
   58 |     return fast_execute_graph_async_ != nullptr;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
[ 81%] Building CXX object torchair/CMakeFiles/_torchair.dir/concrete_graph/utils.cpp.o
[ 82%] Building CXX object torchair/CMakeFiles/_torchair.dir/core/npu_wrapper.cpp.o
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp: In member function ‘tng::Status tng::Session::Initialize(const std::map<std::basic_string<char>, std::basic_string<char> >&):
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:76:3: error: ‘fast_load_graph_’ was not declared in this scope; did you mean ‘FastLoadGraph’?
   76 |   fast_load_graph_ = reinterpret_cast<GeSessionLoadGraphFunc *>(dlsym(libge_runner_handle, "GeSessionLoadGraph"));
      |   ^~~~~~~~~~~~~~~~
      |   FastLoadGraph
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:76:39: error: ‘GeSessionLoadGraphFunc’ does not name a type
   76 |   fast_load_graph_ = reinterpret_cast<GeSessionLoadGraphFunc *>(dlsym(libge_runner_handle, "GeSessionLoadGraph"));
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:76:62: error: expected > before * token
   76 |   fast_load_graph_ = reinterpret_cast<GeSessionLoadGraphFunc *>(dlsym(libge_runner_handle, "GeSessionLoadGraph"));
      |                                                              ^
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:76:62: error: expected ( before * token
   76 |   fast_load_graph_ = reinterpret_cast<GeSessionLoadGraphFunc *>(dlsym(libge_runner_handle, "GeSessionLoadGraph"));
      |                                                              ^
      |                                                              (
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:76:63: error: expected primary-expression before > token
   76 |   fast_load_graph_ = reinterpret_cast<GeSessionLoadGraphFunc *>(dlsym(libge_runner_handle, "GeSessionLoadGraph"));
      |                                                               ^
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:76:114: error: expected ) before ; token
   76 |   fast_load_graph_ = reinterpret_cast<GeSessionLoadGraphFunc *>(dlsym(libge_runner_handle, "GeSessionLoadGraph"));
      |                                                                                                                  ^
      |                                                                                                                  )
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:77:3: error: ‘fast_execute_graph_async_’ was not declared in this scope
   77 |   fast_execute_graph_async_ =
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:78:24: error: ‘GeFastExecuteGraphFunc’ does not name a type
   78 |       reinterpret_cast<GeFastExecuteGraphFunc *>(dlsym(libge_runner_handle, "GeSessionExecuteGraphWithStreamAsync"));
      |                        ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:78:47: error: expected > before * token
   78 |       reinterpret_cast<GeFastExecuteGraphFunc *>(dlsym(libge_runner_handle, "GeSessionExecuteGraphWithStreamAsync"));
      |                                               ^
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:78:47: error: expected ( before * token
   78 |       reinterpret_cast<GeFastExecuteGraphFunc *>(dlsym(libge_runner_handle, "GeSessionExecuteGraphWithStreamAsync"));
      |                                               ^
      |                                               (
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:78:48: error: expected primary-expression before > token
   78 |       reinterpret_cast<GeFastExecuteGraphFunc *>(dlsym(libge_runner_handle, "GeSessionExecuteGraphWithStreamAsync"));
      |                                                ^
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:78:117: error: expected ) before ; token
   78 |       reinterpret_cast<GeFastExecuteGraphFunc *>(dlsym(libge_runner_handle, "GeSessionExecuteGraphWithStreamAsync"));
      |                                                                                                                     ^
      |                                                                                                                     )
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp: In member function ‘tng::Status tng::Session::Finalize():
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:109:3: error: ‘fast_load_graph_’ was not declared in this scope; did you mean ‘FastLoadGraph’?
  109 |   fast_load_graph_ = nullptr;
      |   ^~~~~~~~~~~~~~~~
      |   FastLoadGraph
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:110:3: error: ‘fast_execute_graph_async_’ was not declared in this scope
  110 |   fast_execute_graph_async_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:6:
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp: In member function ‘tng::Status tng::Session::FastLoadGraph(uint32_t, const std::map<ge::AscendString, ge::AscendString>&, void*):
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:237:22: error: ‘fast_load_graph_’ was not declared in this scope; did you mean ‘FastLoadGraph’?
  237 |   TNG_ASSERT_NOTNULL(fast_load_graph_, "FastLoadGraph is unsupported, please dont use it in current cann version.");
      |                      ^~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/checker.h:43:11: note: in definition of macro ‘TNG_ASSERT’
   43 |     if (!(exp)) {                                            \
      |           ^~~
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:237:3: note: in expansion of macro ‘TNG_ASSERT_NOTNULL’
  237 |   TNG_ASSERT_NOTNULL(fast_load_graph_, "FastLoadGraph is unsupported, please dont use it in current cann version.");
      |   ^~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:240:20: error: ‘fast_load_graph_’ was not declared in this scope; did you mean ‘FastLoadGraph’?
  240 |   TNG_ASSERT_GE_OK(fast_load_graph_(*global_ge_session, graph_id, option, stream));
      |                    ^~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/checker.h:64:27: note: in definition of macro ‘TNG_ASSERT_GE_OK’
   64 |     const auto &status = (expr);           \
      |                           ^~~~
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp: In member function ‘tng::Status tng::Session::FastExecuteGraph(uint32_t, const std::vector<gert::Tensor>&, std::vector<gert::Tensor>&, void*):
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:248:22: error: ‘fast_execute_graph_async_’ was not declared in this scope
  248 |   TNG_ASSERT_NOTNULL(fast_execute_graph_async_,
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/checker.h:43:11: note: in definition of macro ‘TNG_ASSERT’
   43 |     if (!(exp)) {                                            \
      |           ^~~
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:248:3: note: in expansion of macro ‘TNG_ASSERT_NOTNULL’
  248 |   TNG_ASSERT_NOTNULL(fast_execute_graph_async_,
      |   ^~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/session.cpp:252:20: error: ‘fast_execute_graph_async_’ was not declared in this scope
  252 |   TNG_ASSERT_GE_OK(fast_execute_graph_async_(*global_ge_session, graph_id, stream, inputs, outputs));
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/checker.h:64:27: note: in definition of macro ‘TNG_ASSERT_GE_OK’
   64 |     const auto &status = (expr);           \
      |                           ^~~~
make[3]: *** [torchair/CMakeFiles/_torchair.dir/build.make:160: torchair/CMakeFiles/_torchair.dir/concrete_graph/session.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/home/HwHiAiUser/project/torchair/torchair/cann_ir_ability/cann_ir_ability.cpp: In function ‘std::string cann_ir_ability::CheckCannCompat(const string&, const std::vector<std::basic_string<char> >&, const std::vector<std::basic_string<char> >&):
/home/HwHiAiUser/project/torchair/torchair/cann_ir_ability/cann_ir_ability.cpp:28:19: warning: loop variable ‘item’ creates a copy from type ‘const std::pair<const ge::AscendString, ge::AscendString> [-Wrange-loop-construct]
   28 |   for (const auto item : attr_names_types) {
      |                   ^~~~
/home/HwHiAiUser/project/torchair/torchair/cann_ir_ability/cann_ir_ability.cpp:28:19: note: use reference type to prevent copying
   28 |   for (const auto item : attr_names_types) {
      |                   ^~~~
      |                   &
In file included from /home/HwHiAiUser/project/torchair/torchair/concrete_graph/concrete_graph.cpp:15:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:15:41: error: ‘GeSessionLoadGraph’ was not declared in this scope
   15 | using GeSessionLoadGraphFunc = decltype(GeSessionLoadGraph);
      |                                         ^~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:15:41: error: ‘GeSessionLoadGraph’ was not declared in this scope
/home/HwHiAiUser/project/torchair/torchair/include/session.h:16:41: error: ‘GeSessionExecuteGraphWithStreamAsync’ was not declared in this scope
   16 | using GeFastExecuteGraphFunc = decltype(GeSessionExecuteGraphWithStreamAsync);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:16:41: error: ‘GeSessionExecuteGraphWithStreamAsync’ was not declared in this scope
/home/HwHiAiUser/project/torchair/torchair/include/session.h:74:3: error: ‘GeSessionLoadGraphFunc’ does not name a type
   74 |   GeSessionLoadGraphFunc *fast_load_graph_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:75:3: error: ‘GeFastExecuteGraphFunc’ does not name a type
   75 |   GeFastExecuteGraphFunc *fast_execute_graph_async_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h: In member function ‘bool tng::Session::IsFastLoadGraphSupported() const’:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:54:12: error: ‘fast_load_graph_’ was not declared in this scope; did you mean FastLoadGraph’?
   54 |     return fast_load_graph_ != nullptr;
      |            ^~~~~~~~~~~~~~~~
      |            FastLoadGraph
/home/HwHiAiUser/project/torchair/torchair/include/session.h: In member function ‘bool tng::Session::IsFastExecuteGraphSupported() const’:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:58:12: error: ‘fast_execute_graph_async_’ was not declared in this scope
   58 |     return fast_execute_graph_async_ != nullptr;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/HwHiAiUser/project/torchair/torchair/concrete_graph/executor.cpp:9:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:15:41: error: ‘GeSessionLoadGraph’ was not declared in this scope
   15 | using GeSessionLoadGraphFunc = decltype(GeSessionLoadGraph);
      |                                         ^~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:15:41: error: ‘GeSessionLoadGraph’ was not declared in this scope
/home/HwHiAiUser/project/torchair/torchair/include/session.h:16:41: error: ‘GeSessionExecuteGraphWithStreamAsync’ was not declared in this scope
   16 | using GeFastExecuteGraphFunc = decltype(GeSessionExecuteGraphWithStreamAsync);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:16:41: error: ‘GeSessionExecuteGraphWithStreamAsync’ was not declared in this scope
/home/HwHiAiUser/project/torchair/torchair/include/session.h:74:3: error: ‘GeSessionLoadGraphFunc’ does not name a type
   74 |   GeSessionLoadGraphFunc *fast_load_graph_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:75:3: error: ‘GeFastExecuteGraphFunc’ does not name a type
   75 |   GeFastExecuteGraphFunc *fast_execute_graph_async_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h: In member function ‘bool tng::Session::IsFastLoadGraphSupported() const’:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:54:12: error: ‘fast_load_graph_’ was not declared in this scope; did you mean FastLoadGraph’?
   54 |     return fast_load_graph_ != nullptr;
      |            ^~~~~~~~~~~~~~~~
      |            FastLoadGraph
In file included from /home/HwHiAiUser/project/torchair/torchair/concrete_graph/export.cpp:13:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:15:41: error: ‘GeSessionLoadGraph’ was not declared in this scope
   15 | using GeSessionLoadGraphFunc = decltype(GeSessionLoadGraph);
      |                                         ^~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h: In member function ‘bool tng::Session::IsFastExecuteGraphSupported() const’:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:58:12: error: ‘fast_execute_graph_async_’ was not declared in this scope
   58 |     return fast_execute_graph_async_ != nullptr;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:15:41: error: ‘GeSessionLoadGraph’ was not declared in this scope
/home/HwHiAiUser/project/torchair/torchair/include/session.h:16:41: error: ‘GeSessionExecuteGraphWithStreamAsync’ was not declared in this scope
   16 | using GeFastExecuteGraphFunc = decltype(GeSessionExecuteGraphWithStreamAsync);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:16:41: error: ‘GeSessionExecuteGraphWithStreamAsync’ was not declared in this scope
/home/HwHiAiUser/project/torchair/torchair/include/session.h:74:3: error: ‘GeSessionLoadGraphFunc’ does not name a type
   74 |   GeSessionLoadGraphFunc *fast_load_graph_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:75:3: error: ‘GeFastExecuteGraphFunc’ does not name a type
   75 |   GeFastExecuteGraphFunc *fast_execute_graph_async_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h: In member function ‘bool tng::Session::IsFastLoadGraphSupported() const’:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:54:12: error: ‘fast_load_graph_’ was not declared in this scope; did you mean FastLoadGraph’?
   54 |     return fast_load_graph_ != nullptr;
      |            ^~~~~~~~~~~~~~~~
      |            FastLoadGraph
/home/HwHiAiUser/project/torchair/torchair/include/session.h: In member function ‘bool tng::Session::IsFastExecuteGraphSupported() const’:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:58:12: error: ‘fast_execute_graph_async_’ was not declared in this scope
   58 |     return fast_execute_graph_async_ != nullptr;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/HwHiAiUser/project/torchair/torchair/include/utils.h:7,
                 from /home/HwHiAiUser/project/torchair/torchair/concrete_graph/utils.cpp:1:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:15:41: error: ‘GeSessionLoadGraph’ was not declared in this scope
   15 | using GeSessionLoadGraphFunc = decltype(GeSessionLoadGraph);
      |                                         ^~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:15:41: error: ‘GeSessionLoadGraph’ was not declared in this scope
/home/HwHiAiUser/project/torchair/torchair/include/session.h:16:41: error: ‘GeSessionExecuteGraphWithStreamAsync’ was not declared in this scope
   16 | using GeFastExecuteGraphFunc = decltype(GeSessionExecuteGraphWithStreamAsync);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:16:41: error: ‘GeSessionExecuteGraphWithStreamAsync’ was not declared in this scope
/home/HwHiAiUser/project/torchair/torchair/include/session.h:74:3: error: ‘GeSessionLoadGraphFunc’ does not name a type
   74 |   GeSessionLoadGraphFunc *fast_load_graph_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h:75:3: error: ‘GeFastExecuteGraphFunc’ does not name a type
   75 |   GeFastExecuteGraphFunc *fast_execute_graph_async_ = nullptr;
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/include/session.h: In member function ‘bool tng::Session::IsFastLoadGraphSupported() const’:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:54:12: error: ‘fast_load_graph_’ was not declared in this scope; did you mean FastLoadGraph’?
   54 |     return fast_load_graph_ != nullptr;
      |            ^~~~~~~~~~~~~~~~
      |            FastLoadGraph
/home/HwHiAiUser/project/torchair/torchair/include/session.h: In member function ‘bool tng::Session::IsFastExecuteGraphSupported() const’:
/home/HwHiAiUser/project/torchair/torchair/include/session.h:58:12: error: ‘fast_execute_graph_async_’ was not declared in this scope
   58 |     return fast_execute_graph_async_ != nullptr;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/utils.cpp: In function ‘std::vector<long int> tng::GetGeTensorShape(const gert::Tensor&):
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/utils.cpp:194:34: error: ‘const struct gert::Shape’ has no member named ‘GetDims’; did you mean ‘GetDim’?
  194 |   return tensor.GetOriginShape().GetDims();
      |                                  ^~~~~~~
      |                                  GetDim
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/utils.cpp: In function ‘tng::Status tng::GeTensorToAtTensor(gert::Tensor&, at::Tensor&):
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/utils.cpp:427:65: error: ‘const struct gert::Shape’ has no member named ‘GetDims’; did you mean ‘GetDim’?
  427 |   const std::vector<int64_t> &dims = ge_tensor.GetOriginShape().GetDims();
      |                                                                 ^~~~~~~
      |                                                                 GetDim
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/utils.cpp:428:35: error: ‘const struct gert::Shape’ has no member named ‘GetDims’; did you mean ‘GetDim’?
  428 |   if (ge_tensor.GetStorageShape().GetDims() != dims) {
      |                                   ^~~~~~~
      |                                   GetDim
/home/HwHiAiUser/project/torchair/torchair/concrete_graph/utils.cpp:447:68: error: ‘class gert::TensorData’ has no member named ‘Release’
  447 |     gert::TensorAddress addr_block = ge_tensor.MutableTensorData().Release(block_manager);
      |                                                                    ^~~~~~~
make[3]: *** [torchair/CMakeFiles/_torchair.dir/build.make:118: torchair/CMakeFiles/_torchair.dir/concrete_graph/export.cpp.o] Error 1
make[3]: *** [torchair/CMakeFiles/_torchair.dir/build.make:90: torchair/CMakeFiles/_torchair.dir/concrete_graph/concrete_graph.cpp.o] Error 1
make[3]: *** [torchair/CMakeFiles/_torchair.dir/build.make:104: torchair/CMakeFiles/_torchair.dir/concrete_graph/executor.cpp.o] Error 1
make[3]: *** [torchair/CMakeFiles/_torchair.dir/build.make:188: torchair/CMakeFiles/_torchair.dir/concrete_graph/utils.cpp.o] Error 1
In file included from /home/HwHiAiUser/.conda/envs/LLM/lib/python3.8/site-packages/torch/include/torch/csrc/utils/python_arg_parser.h:65,
                 from /home/HwHiAiUser/project/torchair/torchair/core/npu_wrapper.cpp:18:
/home/HwHiAiUser/.conda/envs/LLM/lib/python3.8/site-packages/torch/include/torch/csrc/utils/python_strings.h:104:19: warning: ‘pybind11::object PyObject_FastGetAttrString(PyObject*, const char*) defined but not used [-Wunused-function]
  104 | static py::object PyObject_FastGetAttrString(PyObject* obj, const char* name) {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/Makefile2:780: torchair/CMakeFiles/_torchair.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:675: CMakeFiles/torchair.dir/rule] Error 2
make: *** [Makefile:403: torchair] Error 2

@StubbornCalf
Copy link
Author

我使用的设备是香橙派Ai Pro16G,环境是torch2.1.0 python3.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant