mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
dnn: add the CANN backend (#22634)
* cann backend impl v1 * cann backend impl v2: use opencv parsers to build models for cann * adjust fc according to the new transA and transB * put cann net in cann backend node and reuse forwardLayer * use fork() to create a child process and compile cann model * remove legacy code * remove debug code * fall bcak to CPU backend if there is one layer not supoorted by CANN backend * fix netInput forward
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#include <acl/acl.h>
|
||||
#include <unistd.h> // fork()
|
||||
#include <iostream>
|
||||
|
||||
int main(int /*argc*/, char** /*argv*/)
|
||||
{
|
||||
int ret = aclInit(NULL);
|
||||
if (ret != 0)
|
||||
{
|
||||
std::cerr << "Failed to initialize Ascend, ret = " << ret;
|
||||
}
|
||||
|
||||
ret = aclFinalize();
|
||||
if (ret != 0)
|
||||
{
|
||||
std::cerr << "Failed to de-initialize Ascend, ret = " << ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user