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

[OpenCL] panns_cnn14_static fail #2535

Closed
yyqwert4 opened this issue Oct 17, 2022 · 4 comments
Closed

[OpenCL] panns_cnn14_static fail #2535

yyqwert4 opened this issue Oct 17, 2022 · 4 comments
Assignees
Labels

Comments

@yyqwert4
Copy link

标题:[OpenCL] panns_cnn14_static fail
版本、预测库信息:
1)Paddle Lite 版本:branch develop
2)Host 环境:Ubuntu 22.04
3)运行设备环境:X86
4)预测后端信息:OpenCL AMD Radeon RX 6900 XT
预测信息
1)预测 API:API:C++
2)预测选项信息:benchmark_bin,

cmd="gdb -args ./build.lite.linux.x86.gcc.opencl/lite/api/tools/benchmark/benchmark_bin --model_file=./models/panns_cnn14_static/inference.pdmodel --param_file=./models/panns_cnn14_static/inference.pdiparams -input_shape=1,1,1,64 --warmup=10 --repeats=20 --backend=opencl,x86 --gpu_precision=fp32"

-Model link
https://paddlespeech.bj.bcebos.com/cls/inference_model/panns_cnn14_static.tar.gz

======= Opt Info =======
Load paddle model from ./models/panns_cnn14_static/inference.pdmodel and ./models/panns_cnn14_static/inference.pdiparams
Save optimized model to ./models/panns_cnn14_static/opt.nb
I1017 11:15:30.897446 3721898 paddle_api.cc:50] need to check fp16 valid:0
I1017 11:15:30.897454 3721898 paddle_api.cc:57] Found opencl library:1
I1017 11:15:30.897454 3721898 paddle_api.cc:63] dlsym_success:1
I1017 11:15:30.897456 3721898 cl_runtime.h:93] need to check fp16 valid:0
I1017 11:15:30.897459 3721898 paddle_api.cc:70] opencl_valid:1
I1017 11:15:30.897461 3721898 paddle_api.cc:323] opencl binary path and file name:/paddle_lite_opencl_kernel.bin
I1017 11:15:30.897464 3721898 paddle_api.cc:50] need to check fp16 valid:0
I1017 11:15:30.897465 3721898 paddle_api.cc:57] Found opencl library:1
I1017 11:15:30.897466 3721898 paddle_api.cc:63] dlsym_success:1
I1017 11:15:30.897467 3721898 cl_runtime.h:93] need to check fp16 valid:0
I1017 11:15:30.897469 3721898 paddle_api.cc:70] opencl_valid:1
I1017 11:15:30.897502 3721898 cl_runtime.cc:863] tuned_file:/paddle_lite_opencl_tuned.params
W1017 11:15:30.897512 3721898 cl_runtime.cc:872] Not found tuned file:/paddle_lite_opencl_tuned.params
[New Thread 0x7ffff79fa640 (LWP 3721912)]
I1017 11:15:30.904769 3721898 paddle_api.cc:341] set opencl_tune_mode: CL_TUNE_NORMAL, lws_repeats:4
I1017 11:15:30.904780 3721898 paddle_api.cc:344] tuned file path & name:/paddle_lite_opencl_tuned.params
I1017 11:15:30.904783 3721898 paddle_api.cc:50] need to check fp16 valid:0
I1017 11:15:30.904783 3721898 paddle_api.cc:57] Found opencl library:1
I1017 11:15:30.904785 3721898 paddle_api.cc:63] dlsym_success:1
I1017 11:15:30.904786 3721898 cl_runtime.h:93] need to check fp16 valid:0
I1017 11:15:30.904788 3721898 paddle_api.cc:70] opencl_valid:1
I1017 11:15:30.904789 3721898 paddle_api.cc:356] set opencl precision: CL_PRECISION_FP32
[Thread 0x7fffe4178640 (LWP 3721905) exited]
I1017 11:15:31.079012 3721898 cl_runtime.h:93] need to check fp16 valid:0
W1017 11:15:31.080636 3721898 cl_runtime.cc:220] There is no precompiled OpenCL binary[/paddle_lite_opencl_kernel.bin] in the given OpenCL binary path. Also please make sure the storage directory exist and you have Write&Read permission. Jump to build program from source.
F1017 11:15:33.805438 3721898 reshape_op.cc:239] Check failed: unk_dim_idx == -1 (0 vs. -1) Only one input dimension of Attr(shape) can be unknown.
*** Check failure stack trace: ***

Thread 1 "benchmark_bin" received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737347850624) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.

(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737347850624) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140737347850624) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140737347850624, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007ffff7a47476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff7a2d7f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00005555567137ba in google::logging_fail() ()
#6 0x00005555567137ec in google::LogMessage::Fail() ()
#7 0x0000555556713727 in google::LogMessage::SendToLog() ()
#8 0x0000555556713058 in google::LogMessage::Flush() ()
#9 0x0000555556716666 in google::LogMessageFatal::~LogMessageFatal() ()
#10 0x00005555574fb8ae in paddle::lite::operators::ValidateShape (shape=std::vector of length 3, capacity 3 = {...}, input_dims=...)
at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/operators/reshape_op.cc:239
#11 0x00005555574fa228 in paddle::lite::operators::ReshapeOp::InferShapeImpl (this=0x555558c6e460)
at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/operators/reshape_op.cc:139
#12 0x00005555574f99a9 in paddle::lite::operators::ReshapeOp::InferShape (this=0x555558c6e460)
at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/operators/reshape_op.cc:70
#13 0x00005555578e112d in paddle::lite::Instruction::Run (this=0x555558e14320) at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/core/program.cc:842
#14 0x00005555578df449 in paddle::lite::RuntimeProgram::Run (this=0x555558bd9650)
at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/core/program.cc:643
#15 0x000055555688577a in paddle::lite::LightPredictor::Run (this=0x555558bbbf20)
at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/api/light_api.h:71
#16 0x00005555568820a8 in paddle::lite::LightPredictorImpl::Run (this=0x555558dfeaa0)
at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/api/light_api_impl.cc:139
#17 0x00005555566da0e4 in paddle::lite_api::RunImpl (predictor=std::shared_ptrpaddle::lite_api::PaddlePredictor (use count 2, weak count 0) = {...},
perf_data=0x7fffffffdbc0) at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/api/tools/benchmark/benchmark.cc:82
#18 0x00005555566da677 in paddle::lite_api::Run (model_file="./models/panns_cnn14_static/opt.nb",
input_shapes=std::vector of length 1, capacity 1 = {...}) at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/api/tools/benchmark/benchmark.cc:193
#19 0x00005555566d9e7f in paddle::lite_api::Benchmark (argc=1, argv=0x7fffffffe240)
at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/api/tools/benchmark/benchmark.cc:60
#20 0x00005555566d9d87 in main (argc=8, argv=0x7fffffffe208) at /home/yaoyao/work/gitlab/fortest/paddle-lite/lite/api/tools/benchmark/benchmark.cc:36
(gdb)

@zh794390558
Copy link
Collaborator

这个是paddlelite相关的问题吗?可以以去paddleLite下面提issue。

@QShiX
Copy link

QShiX commented Oct 19, 2022

注释掉paddle lite 中opencl的reduce_ 可以解决问题。

@yt605155624
Copy link
Collaborator

@QShiX #2534 请问这个 issue 也可以这么解决嘛?

@QShiX
Copy link

QShiX commented Oct 19, 2022

@yt605155624 好像不行,有问题的可能不光是那个算子。

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

4 participants