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

无法注册GPU算子 | Unable to register the GPU operator #238

Open
Ryanwjx opened this issue Dec 19, 2024 · 0 comments
Open

无法注册GPU算子 | Unable to register the GPU operator #238

Ryanwjx opened this issue Dec 19, 2024 · 0 comments

Comments

@Ryanwjx
Copy link

Ryanwjx commented Dec 19, 2024

我试图运行示例代码rknn_custom_gpu_op_demo,但是卡在rknn_init。

uint32_t flag = 0;
flag          = flag | RKNN_FLAG_EXECUTE_FALLBACK_PRIOR_DEVICE_GPU;
int ret = rknn_init(&ctx, model_path, 0, flag, NULL);  //卡住!!!

如果不设置FLAG,而是通过先加载模型,再注册GPU算子,则卡在注册算子:

size_t model_size;
void* model_data = load_file(model_path, &model_size);
int ret = rknn_init(&ctx, model_data, model_size, 0, NULL);
free(model_data);
auto gpu_user_op= get_rknn_custom_op();
ret = rknn_register_custom_ops(ctx, gpu_user_op, 1);   //卡住!!!

I tried to run the sample coderknn_custom_gpu_op_demo, but stuck in rknn_init.

uint32_t flag = 0;
flag          = flag | RKNN_FLAG_EXECUTE_FALLBACK_PRIOR_DEVICE_GPU;
int ret = rknn_init(&ctx, model_path, 0, flag, NULL);   // Stuck!!

If you do not set FLAG, but load the model first and then register the GPU operator, the registration operator is stuck:

size_t model_size;
void* model_data = load_file(model_path, &model_size);
int ret = rknn_init(&ctx, model_data, model_size, 0, NULL);
free(model_data);
auto gpu_user_op= get_rknn_custom_op();
ret = rknn_register_custom_ops(ctx, gpu_user_op, 1);   // Stuck!!
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