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

MacOS 下开启 Metal 会崩溃 #386

Open
xp19870106 opened this issue May 12, 2023 · 4 comments
Open

MacOS 下开启 Metal 会崩溃 #386

xp19870106 opened this issue May 12, 2023 · 4 comments
Labels

Comments

@xp19870106
Copy link

在void MNNRobustVideoMatting::initialize_interpreter()中,修改代码,设置Metal,如下
MNN::BackendConfig backend_config;
backend_config.precision = MNN::BackendConfig::Precision_High; // default Precision_High
schedule_config.backendConfig = &backend_config;
schedule_config.type = MNN_FORWARD_METAL;
schedule_config.backupType = MNN_FORWARD_METAL;

在执行static void test_mnn()的时候,会崩溃
截屏2023-05-12 15 23 48

请问是否我开在MNN Metal的方式不对

@DefTruth
Copy link
Owner

暂时没有测试过metal哈

@xp19870106
Copy link
Author

暂时没有测试过metal哈

那如果想要开启GPU加速,在Mac下目前是用什么方案呢?

@LiYufengzz
Copy link

mnn调用非cpu后端的时候,需要使用CopyFromHostTensor来进行tensor的拷贝,否则会出现空指针导致crash

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants