1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #23936 from SaltFish-T:4.x

Update opencv dnn to support cann version >=6.3 #23936

1.modify the search path of "libopsproto.so" in OpenCVFindCANN.cmake
2.add the search path of "libgraph_base.so" in OpenCVFindCANN.cmake
3.automatic check Ascend socVersion,and test on Ascend310/Ascend310B/Ascend910B well
This commit is contained in:
SaltFish-T
2023-07-27 19:21:30 +08:00
committed by GitHub
parent 5fc2564c92
commit ab6bffc6f8
3 changed files with 45 additions and 10 deletions
+2 -2
View File
@@ -304,9 +304,9 @@ std::shared_ptr<ge::ModelBufferData> compileCannGraph(std::shared_ptr<ge::Graph>
bool ok;
if ((child=fork()) == 0)
{
// initialize engine
// initialize engine Ascend310/Ascend310P3/Ascend910B/Ascend310B
std::map<ge::AscendString, ge::AscendString> options = {
{ge::AscendString(ge::ir_option::SOC_VERSION), ge::AscendString("Ascend310")},
{ge::AscendString(ge::ir_option::SOC_VERSION), ge::AscendString(aclrtGetSocName())},
};
ACL_CHECK_GRAPH_RET(ge::aclgrphBuildInitialize(options));
+5 -1
View File
@@ -10,7 +10,11 @@
#include "graph/graph.h" // ge::Graph; ge::Operator from operator.h
#include "graph/ge_error_codes.h" // GRAPH_SUCCESS, ...
#include "op_proto/built-in/inc/all_ops.h" // ge::Conv2D, ...
#ifdef CANN_VERSION_BELOW_6_3_ALPHA002
#include "op_proto/built-in/inc/all_ops.h" // ge::Conv2D, ...
#else
#include "built-in/op_proto/inc/all_ops.h" // ge::Conv2D, ...
#endif
#include "graph/tensor.h" // ge::Shape, ge::Tensor, ge::TensorDesc
#include "graph/types.h" // DT_FLOAT, ... ; FORMAT_NCHW, ...