Encountering problems when running darknet on RPI3B+
ziqi-zhang opened this issue · 0 comments
ziqi-zhang commented
Hi,
I tried to run darknet on RPI 3B+ with VC4CL. I can compile the code but encounteredNormalizer: Invalid local type for memory area: (g) f32* %arrayidx29.sink75
when running the program. The VC4CL library is the official one https://github.com/doe300/VC4CL. The console output is as follows:
Device IDs: 1
gpuserv: vc_gpuserv_init: starting initialisation
Device ID: 0
Device name: VideoCore IV GPU
Device vendor: Broadcom
Device opencl availability: OpenCL 1.2 VC4CL 0.4.9999 (1acb1b8)
Device opencl used: 0.4.9999
Device double precision: NO
Device max group size: 12
Device address bits: 32
activation_kernel_init
[VC4CL]( darknet): Precompiling source with:
Dumping program sources to /tmp/vc4cl-source-1804289383.cl
[VC4CL]( darknet): Dumping program IR to /tmp/vc4cl-ir-846930886.ll
[VC4CL]( darknet): Precompilation complete with status: 0
[VC4CL]( darknet): Compiling source with:
[VC4CL]( darknet): Dumping program IR to /tmp/vc4cl-ir-1681692777.bc
[VC4CL]( darknet): Compilation complete with status: 0
Dumping program binaries to /tmp/vc4cl-binary-1714636915.bin
blas_kernel_init
opencl_device_id_t==0
opencl_load_buffer
[VC4CL]( darknet): Precompiling source with:
Dumping program sources to /tmp/vc4cl-source-1957747793.cl
[VC4CL]( darknet): Dumping program IR to /tmp/vc4cl-ir-424238335.ll
[VC4CL]( darknet): Precompilation complete with status: 0
[VC4CL]( darknet): Compiling source with:
[VC4CL]( darknet): Dumping program IR to /tmp/vc4cl-ir-719885386.bc
[VC4CL]( darknet): Compilation complete with status: 0
Compilation log: [W] Wed Feb 2 04:11:42 2022: Register conflict resolver has exceeded its maximum rounds, there might still be errors!
Dumping program binaries to /tmp/vc4cl-binary-1102520059.bin
[VC4CL]( darknet): Precompiling source with:
Dumping program sources to /tmp/vc4cl-source-2044897763.cl
[VC4CL]( darknet): Dumping program IR to /tmp/vc4cl-ir-1967513926.ll
[VC4CL]( darknet): Precompilation complete with status: 0
[VC4CL]( darknet): Compiling source with:
[VC4CL]( darknet): Dumping program IR to /tmp/vc4cl-ir-1365180540.bc
[VC4CL]( darknet): Compilation complete with status: 0
Dumping program binaries to /tmp/vc4cl-binary-1540383426.bin
[VC4CL]( darknet): Precompiling source with:
Dumping program sources to /tmp/vc4cl-source-304089172.cl
[VC4CL]( darknet): Dumping program IR to /tmp/vc4cl-ir-1303455736.ll
[VC4CL]( darknet): Precompilation complete with status: 0
[VC4CL]( darknet): Compiling source with:
[VC4CL]( darknet): Dumping program IR to /tmp/vc4cl-ir-35005211.bc
[VC4CL]( darknet): Compilation error: Normalizer: Invalid local type for memory area: (g) f32* %arrayidx29.sink75
[VC4CL]( darknet): Compilation complete with status: -11
Compilation log: Compilation error:
Normalizer: Invalid local type for memory area: (g) f32* %arrayidx29.sink75
[E] Wed Feb 2 04:12:21 2022: Failed to find memory area for local: (g) f32* %arrayidx29.sink75
[E] Wed Feb 2 04:12:21 2022: Writer: (g) f32* %arrayidx29.sink75 = (g) f32* %arrayidx33 (ifzc )
[E] Wed Feb 2 04:12:21 2022: Writer: (g) f32* %arrayidx29.sink75 = (g) f32* %arrayidx29 (ifz )
[E] Wed Feb 2 04:12:21 2022: Writer: store f32 %add30 into (g) f32* %arrayidx29.sink75 (guarded)
[E] Wed Feb 2 04:12:21 2022: Reader: f32 %tmp.24427 = load memory at (g) f32* %arrayidx29.sink75 (guarded)
[E] Wed Feb 2 04:12:22 2022: (1) /usr/lib/libVC4CC.so.1.2 : vc4c::CompilationError::CompilationError(vc4c::CompilationStep, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::cha
r_traits<char>, std::allocator<char> > const&)+0xf4 [0x7624ea60]
[E] Wed Feb 2 04:12:22 2022: (2) /usr/lib/libVC4CC.so.1.2 : +0xe51b14 [0x76610b14]
[E] Wed Feb 2 04:12:22 2022: (3) /usr/lib/libVC4CC.so.1.2 : vc4c::normalization::determineMemoryAccess(vc4c::Method&)+0x25e0 [0x76614038]
[E] Wed Feb 2 04:12:22 2022: (4) /usr/lib/libVC4CC.so.1.2 : vc4c::normalization::mapMemoryAccess(vc4c::Module const&, vc4c::Method&, vc4c::Configuration const&)+0x30 [0x765fc7c4]
[E] Wed Feb 2 04:12:22 2022: (5) /usr/lib/libVC4CC.so.1.2 : vc4c::normalization::Normalizer::normalizeMethod(vc4c::Module&, vc4c::Method&) const+0x430 [0x766480c0]
[E] Wed Feb 2 04:12:22 2022: (6) /usr/lib/libVC4CC.so.1.2 : +0xe87cc4 [0x76646cc4]
[E] Wed Feb 2 04:12:22 2022: (7) /usr/lib/libVC4CC.so.1.2 : +0xe8ab78 [0x76649b78]
[E] Wed Feb 2 04:12:22 2022: (8) /usr/lib/libVC4CC.so.1.2 : std::function<void (vc4c::Method* const&)>::operator()(vc4c::Method* const&) const+0x54 [0x76257e74]
[E] Wed Feb 2 04:12:22 2022: (9) /usr/lib/libVC4CC.so.1.2 : vc4c::ThreadPool::scheduleAll<vc4c::Method*, std::vector<vc4c::Method*, std::allocator<vc4c::Method*> > >(std::vector<vc4c::Method*, std::allocator<vc4c::Method*> > const&, std::function<void (
vc4c::Method* const&)> const&, logging::Logger*)::{lambda()#1}::operator()() const+0x2c [0x762564b0]
[E] Wed Feb 2 04:12:22 2022: (10) /usr/lib/libVC4CC.so.1.2 : std::_Function_handler<void (), vc4c::ThreadPool::scheduleAll<vc4c::Method*, std::vector<vc4c::Method*, std::allocator<vc4c::Method*> > >(std::vector<vc4c::Method*, std::allocator<vc4c::Method
*> > const&, std::function<void (vc4c::Method* const&)> const&, logging::Logger*)::{lambda()#1}>::_M_invoke(std::_Any_data const&)+0x24 [0x7625940c]
[E] Wed Feb 2 04:12:22 2022: (11) /usr/lib/libVC4CC.so.1.2 : std::function<void ()>::operator()() const+0x40 [0x762ded68]
[E] Wed Feb 2 04:12:22 2022: (12) /usr/lib/libVC4CC.so.1.2 : +0xb1a8f0 [0x762d98f0]
[E] Wed Feb 2 04:12:22 2022: (13) /usr/lib/libVC4CC.so.1.2 : +0xb1d270 [0x762dc270]
[E] Wed Feb 2 04:12:22 2022: (14) /usr/lib/libVC4CC.so.1.2 : +0xb1d240 [0x762dc240]
[E] Wed Feb 2 04:12:22 2022: (15) /usr/lib/libVC4CC.so.1.2 : +0xb1d1c4 [0x762dc1c4]
[E] Wed Feb 2 04:12:22 2022: (16) /usr/lib/libVC4CC.so.1.2 : +0xb1d198 [0x762dc198]
[E] Wed Feb 2 04:12:22 2022: (17) /usr/lib/libVC4CC.so.1.2 : +0xb1d0dc [0x762dc0dc]
[E] Wed Feb 2 04:12:22 2022: (18) /usr/lib/libVC4CC.so.1.2 : +0xb1cf10 [0x762dbf10]
[E] Wed Feb 2 04:12:22 2022: (19) /usr/lib/libVC4CC.so.1.2 : +0xb1cd5c [0x762dbd5c]
[E] Wed Feb 2 04:12:22 2022: (20) /usr/lib/libVC4CC.so.1.2 : std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const+0x48 [0x762de2a4]
[E] Wed Feb 2 04:12:22 2022: (21) /usr/lib/libVC4CC.so.1.2 : std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)+0x28 [0x762dd374]
[E] Wed Feb 2 04:12:22 2022: (22) /usr/lib/libVC4CC.so.1.2 : void std::__invoke_impl<void, void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool
*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::*&&)(std::function<std::u
nique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&$
bool*&&)+0xb0 [0x762e0050]
[E] Wed Feb 2 04:12:22 2022: (23) /usr/lib/libVC4CC.so.1.2 : std::result_of<void (std::__future_base::_State_baseV2::*&&(std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_ba
se::_Deleter> ()>*&&, bool*&&))(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::type std::__invoke<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__
future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(void (std::__
future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base
, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)+0x64 [0x762df248]
[E] Wed Feb 2 04:12:22 2022: (24) /usr/lib/libVC4CC.so.1.2 : std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__futu
re_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_ba
se::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#1}::o
perator()() const+0x70 [0x762ddb18]
[E] Wed Feb 2 04:12:22 2022: (25) /usr/lib/libVC4CC.so.1.2 : std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__futu
re_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_ba
se::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#2}::o
perator()() const+0x30 [0x762ddbe4]
[E] Wed Feb 2 04:12:22 2022: (26) /usr/lib/libVC4CC.so.1.2 : std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__futu
re_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_ba
se::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#2}::_
FUN()+0x10 [0x762ddc04]
[E] Wed Feb 2 04:12:22 2022: (27) /lib/arm-linux-gnueabihf/libpthread.so.0 : +0xf158 [0x76eff158]
[E] Wed Feb 2 04:12:22 2022: (27) /lib/arm-linux-gnueabihf/libpthread.so.0 : +0xf158 [0x76eff158]
[E] Wed Feb 2 04:12:22 2022: (28) /usr/lib/libVC4CC.so.1.2 : +0xb1a34c [0x762d934c]
[E] Wed Feb 2 04:12:22 2022: (29) /usr/lib/libVC4CC.so.1.2 : void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::_
_future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__futu
re_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)+0xac [0x762
ddcec]
[E] Wed Feb 2 04:12:22 2022: (30) /usr/lib/libVC4CC.so.1.2 : std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool)+0x94 [0x762dcd9c]
[E] Wed Feb 2 04:12:22 2022: (31) /usr/lib/libVC4CC.so.1.2 : +0xb1c688 [0x762db688]
[E] Wed Feb 2 04:12:22 2022: (32) /usr/lib/libVC4CC.so.1.2 : std::packaged_task<void ()>::operator()()+0x40 [0x762df15c]
[E] Wed Feb 2 04:12:22 2022: (33) /usr/lib/libVC4CC.so.1.2 : vc4c::ThreadPool::workerTask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x194 [0x762d9c5c]
[E] Wed Feb 2 04:12:22 2022: (34) /usr/lib/libVC4CC.so.1.2 : +0xb1a644 [0x762d9644]
[E] Wed Feb 2 04:12:22 2022: (35) /usr/lib/libVC4CC.so.1.2 : +0xb1cadc [0x762dbadc]
[E] Wed Feb 2 04:12:22 2022: (36) /usr/lib/libVC4CC.so.1.2 : +0xb1c868 [0x762db868]
[E] Wed Feb 2 04:12:22 2022: (37) /usr/lib/libVC4CC.so.1.2 : +0xb1c550 [0x762db550]
[E] Wed Feb 2 04:12:22 2022: (38) /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 : +0x9d9b0 [0x76e2e9b0]
[E] Wed Feb 2 04:12:22 2022: Compiler threw exception: Normalizer: Invalid local type for memory area: (g) f32* %arrayidx29.sink75
Dumping program binaries to /tmp/vc4cl-binary-294702567.bin
FATAL ERROR: CL_UNKNOWN_ERROR
opencl_load: could not compile. error: CL_UNKNOWN_ERROR
code:
Compilation error:
Normalizer: Invalid local type for memory area: (g) f32* %arrayidx29.sink75
[E] Wed Feb 2 04:12:21 2022: Failed to find memory area for local: (g) f32* %arrayidx29.sink75
[E] Wed Feb 2 04:12:21 2022: Writer: (g) f32* %arrayidx29.sink75 = (g) f32* %arrayidx33 (ifzc )
[E] Wed Feb 2 04:12:21 2022: Writer: (g) f32* %arrayidx29.sink75 = (g) f32* %arrayidx29 (ifz )
[E] Wed Feb 2 04:12:21 2022: Writer: store f32 %add30 into (g) f32* %arrayidx29.sink75 (guarded)
[E] Wed Feb 2 04:12:21 2022: Reader: f32 %tmp.24427 = load memory at (g) f32* %arrayidx29.sink75 (guarded)
[E] Wed Feb 2 04:12:22 2022: (1) /usr/lib/libVC4CC.so.1.2 : vc4c::CompilationError::CompilationError(vc4c::CompilationStep, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::cha
r_traits<char>, std::allocator<char> > const&)+0xf4 [0x7624ea60]
[E] Wed Feb 2 04:12:22 2022: (2) /usr/lib/libVC4CC.so.1.2 : +0xe51b14 [0x76610b14]
[E] Wed Feb 2 04:12:22 2022: (3) /usr/lib/libVC4CC.so.1.2 : vc4c::normalization::determineMemoryAccess(vc4c::Method&)+0x25e0 [0x76614038]
[E] Wed Feb 2 04:12:22 2022: (4) /usr/lib/libVC4CC.so.1.2 : vc4c::normalization::mapMemoryAccess(vc4c::Module const&, vc4c::Method&, vc4c::Configuration const&)+0x30 [0x765fc7c4]
[E] Wed Feb 2 04:12:22 2022: (5) /usr/lib/libVC4CC.so.1.2 : vc4c::normalization::Normalizer::normalizeMethod(vc4c::Module&, vc4c::Method&) const+0x430 [0x766480c0]
[E] Wed Feb 2 04:12:22 2022: (6) /usr/lib/libVC4CC.so.1.2 : +0xe87cc4 [0x76646cc4]
[E] Wed Feb 2 04:12:22 2022: (7) /usr/lib/libVC4CC.so.1.2 : +0xe8ab78 [0x76649b78]
[E] Wed Feb 2 04:12:22 2022: (8) /usr/lib/libVC4CC.so.1.2 : std::function<void (vc4c::Method* const&)>::operator()(vc4c::Method* const&) const+0x54 [0x76257e74]
[E] Wed Feb 2 04:12:22 2022: (9) /usr/lib/libVC4CC.so.1.2 : vc4c::ThreadPool::scheduleAll<vc4c::Method*, std::vector<vc4c::Method*, std::allocator<vc4c::Method*> > >(std::vector<vc4c::Method*, std::allocator<vc4c::Method*> > const&, std::function<void (
vc4c::Method* const&)> const&, logging::Logger*)::{lambda()#1}::operator()() const+0x2c [0x762564b0]
[E] Wed Feb 2 04:12:22 2022: (10) /usr/lib/libVC4CC.so.1.2 : std::_Function_handler<void (), vc4c::ThreadPool::scheduleAll<vc4c::Method*, std::vector<vc4c::Method*, std::allocator<vc4c::Method*> > >(std::vector<vc4c::Method*, std::allocator<vc4c::Method
*> > const&, std::function<void (vc4c::Method* const&)> const&, logging::Logger*)::{lambda()#1}>::_M_invoke(std::_Any_data const&)+0x24 [0x7625940c]
[E] Wed Feb 2 04:12:22 2022: (11) /usr/lib/libVC4CC.so.1.2 : std::function<void ()>::operator()() const+0x40 [0x762ded68]
[E] Wed Feb 2 04:12:22 2022: (12) /usr/lib/libVC4CC.so.1.2 : +0xb1a8f0 [0x762d98f0]
[E] Wed Feb 2 04:12:22 2022: (13) /usr/lib/libVC4CC.so.1.2 : +0xb1d270 [0x762dc270]
[E] Wed Feb 2 04:12:22 2022: (14) /usr/lib/libVC4CC.so.1.2 : +0xb1d240 [0x762dc240]
[E] Wed Feb 2 04:12:22 2022: (15) /usr/lib/libVC4CC.so.1.2 : +0xb1d1c4 [0x762dc1c4]
[E] Wed Feb 2 04:12:22 2022: (16) /usr/lib/libVC4CC.so.1.2 : +0xb1d198 [0x762dc198]
[E] Wed Feb 2 04:12:22 2022: (17) /usr/lib/libVC4CC.so.1.2 : +0xb1d0dc [0x762dc0dc]
[E] Wed Feb 2 04:12:22 2022: (18) /usr/lib/libVC4CC.so.1.2 : +0xb1cf10 [0x762dbf10]
[E] Wed Feb 2 04:12:22 2022: (19) /usr/lib/libVC4CC.so.1.2 : +0xb1cd5c [0x762dbd5c]
[E] Wed Feb 2 04:12:22 2022: (20) /usr/lib/libVC4CC.so.1.2 : std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const+0x48 [0x762de2a4]
[E] Wed Feb 2 04:12:22 2022: (21) /usr/lib/libVC4CC.so.1.2 : std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)+0x28 [0x762dd374]
[E] Wed Feb 2 04:12:22 2022: (22) /usr/lib/libVC4CC.so.1.2 : void std::__invoke_impl<void, void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)+0xb0 [0x762e0050]
[E] Wed Feb 2 04:12:22 2022: (23) /usr/lib/libVC4CC.so.1.2 : std::result_of<void (std::__future_base::_State_baseV2::*&&(std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&))(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::type std::__invoke<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)+0x64 [0x762df248]
[E] Wed Feb 2 04:12:22 2022: (24) /usr/lib/libVC4CC.so.1.2 : std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#1}::operator()() const+0x70 [0x762ddb18]
[E] Wed Feb 2 04:12:22 2022: (25) /usr/lib/libVC4CC.so.1.2 : std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#2}::operator()() const+0x30 [0x762ddbe4]
[E] Wed Feb 2 04:12:22 2022: (26) /usr/lib/libVC4CC.so.1.2 : std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#2}::_FUN()+0x10 [0x762ddc04]
[E] Wed Feb 2 04:12:22 2022: (27) /lib/arm-linux-gnueabihf/libpthread.so.0 : +0xf158 [0x76eff158]
[E] Wed Feb 2 04:12:22 2022: (28) /usr/lib/libVC4CC.so.1.2 : +0xb1a34c [0x762d934c]
[E] Wed Feb 2 04:12:22 2022: (29) /usr/lib/libVC4CC.so.1.2 : void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)+0xac [0x762ddcec]
[E] Wed Feb 2 04:12:22 2022: (30) /usr/lib/libVC4CC.so.1.2 : std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool)+0x94 [0x762dcd9c]
[E] Wed Feb 2 04:12:22 2022: (31) /usr/lib/libVC4CC.so.1.2 : +0xb1c688 [0x762db688]
[E] Wed Feb 2 04:12:22 2022: (32) /usr/lib/libVC4CC.so.1.2 : std::packaged_task<void ()>::operator()()+0x40 [0x762df15c]
[E] Wed Feb 2 04:12:22 2022: (33) /usr/lib/libVC4CC.so.1.2 : vc4c::ThreadPool::workerTask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x194 [0x762d9c5c]
[E] Wed Feb 2 04:12:22 2022: (34) /usr/lib/libVC4CC.so.1.2 : +0xb1a644 [0x762d9644]
[E] Wed Feb 2 04:12:22 2022: (35) /usr/lib/libVC4CC.so.1.2 : +0xb1cadc [0x762dbadc]
[E] Wed Feb 2 04:12:22 2022: (36) /usr/lib/libVC4CC.so.1.2 : +0xb1c868 [0x762db868]
[E] Wed Feb 2 04:12:22 2022: (37) /usr/lib/libVC4CC.so.1.2 : +0xb1c550 [0x762db550]
[E] Wed Feb 2 04:12:22 2022: (38) /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 : +0x9d9b0 [0x76e2e9b0]
[E] Wed Feb 2 04:12:22 2022: Compiler threw exception: Normalizer: Invalid local type for memory area: (g) f32* %arrayidx29.sink75
I found that the code to cause this problem is the function called opencl_load_buffer
, which I list below:
void opencl_load_buffer(const char *buffer, const size_t size, cl_program *output)
{
cl_int clErr;
*output = clCreateProgramWithSource(opencl_context, 1,
(const char**)&buffer, &size, &clErr);
if (clErr != CL_SUCCESS)
{
printf("opencl_load: could not create program. error: %s\n", clCheckError(clErr));
exit(-1);
}
#ifdef ARM
clErr = clBuildProgram(
*output,
1,
&opencl_devices[opencl_device_id_t],
NULL, NULL, NULL);
#else
clErr = clBuildProgram(
*output,
1,
&opencl_devices[opencl_device_id_t],
"-Werror "
"-cl-std=CL1.2 "
"-cl-opt-disable "
//"-cl-denorms-are-zero "
//"-cl-fp32-correctly-rounded-divide-sqrt "
"-cl-no-signed-zeros "
"-cl-mad-enable "
//"-cl-fast-relaxed-math "
, NULL, NULL);
#endif
if (clErr != CL_SUCCESS)
{
printf("opencl_load: could not compile. error: %s\n", clCheckError(clErr));
size_t len;
char *ebuffer = (char*)calloc(0x10000000, sizeof(char));
clGetProgramBuildInfo(*output, opencl_devices[opencl_device_id_t], CL_PROGRAM_BUILD_LOG, 0x10000000 * sizeof(char), ebuffer, &len);
printf("code:\n%s\n", ebuffer);
free(ebuffer);
exit(-1);
}
}
Besides, I also tried other opencl implementations, such as the libopencl-stub you posted in DarkNet in OpenCL on Asus Thinker Board S, but the problem is the same.
Do you know how can I fix this problem? Is it because the function invokes some unimplemented library functions?
Thanks!