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

MNN1.2 MNN_CODEGEN_REGISTER是什么?可以关了吗? #2860

Open
xin486946 opened this issue May 9, 2024 · 3 comments
Open

MNN1.2 MNN_CODEGEN_REGISTER是什么?可以关了吗? #2860

xin486946 opened this issue May 9, 2024 · 3 comments
Labels
User The user ask question about how to use. Or don't use MNN correctly and cause bug.

Comments

@xin486946
Copy link

https://github.com/alibaba/MNN/tree/1.2.0/source/backend/arm82/Arm82Backend.cpp中全局如下:
#ifndef MNN_CODEGEN_REGISTER
static const auto __arm82_global_initializer = {
registerArm82RuntimeCreator();
return true;
}();
#endif

请问这个是干嘛的?如果我定义MNN_CODEGEN_REGISTER把这个屏蔽掉编译mnn库是否可以

@jxt1234
Copy link
Collaborator

jxt1234 commented May 9, 2024

master 上这个宏已经弃用,若你在老版本上做了修改,请自行判断。

@jxt1234 jxt1234 added the User The user ask question about how to use. Or don't use MNN correctly and cause bug. label May 9, 2024
@xin486946
Copy link
Author

master 上这个宏已经弃用,若你在老版本上做了修改,请自行判断。

嗯看新版本master已经弃用了 所以1.2上也删了。请问下这块是什么作用呢

@jxt1234
Copy link
Collaborator

jxt1234 commented May 22, 2024

历史上的作用是把 cpu / metal 的注册函数由定义静态变量自注册改为在初始化函数中注册。现在这部分已经全部切换为在初始化函数中注册,不再使用静态变量注册的方法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User The user ask question about how to use. Or don't use MNN correctly and cause bug.
Projects
None yet
Development

No branches or pull requests

2 participants