Build error when make hexagon_benchmarks
Hi, dear,
I was trying to build hexagon_benchmarks, but see below error:
gaussian5x5_generator: /home/halidenightly/build_bot/worker/linux-64-gcc53-trunk/llvm/lib/CodeGen/LiveVariables.cpp:114: void llvm::LiveVariables::MarkVirtRegAliveInBlock(llvm::LiveVariables::VarInfo&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, std::vectorllvm::MachineBasicBlock*&): Assertion `MBB != &MF->front() && "Can't find reaching def for virtreg"' failed. Makefile:88: recipe for target 'bin/arm-64-android/gaussian5x5_hvx128.o' failed
How do I resolve this? Do I have to get the halidenightly to make a build?
Thanks
Hi Sam
Which flavor of Halide build are you using?
I saw success this morning around 5am CDT building
Llvm.org(master latest) + Halide.org(master latest)
Ron
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
From: Sam [mailto:[email protected]] Sent: Tuesday, October 10, 2017 4:34 PM To: halide/Halide [email protected] Cc: Subscribed [email protected] Subject: [halide/Halide] Build error when make hexagon_benchmarks (#2428)
Hi, dear,
I was trying to build hexagon_benchmarks, but see below error:
gaussian5x5_generator: /home/halidenightly/build_bot/worker/linux-64-gcc53-trunk/llvm/lib/CodeGen/LiveVariables.cpp:114: void llvm::LiveVariables::MarkVirtRegAliveInBlock(llvm::LiveVariables::VarInfo&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, std::vectorllvm::MachineBasicBlock*&): Assertion `MBB != &MF->front() && "Can't find reaching def for virtreg"' failed. Makefile:88: recipe for target 'bin/arm-64-android/gaussian5x5_hvx128.o' failed
How do I resolve this? Do I have to get the halidenightly to make a build?
Thanks
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/halide/Halide/issues/2428 , or mute the thread https://github.com/notifications/unsubscribe-auth/APZMZ7TyT_NrT2bhloVecki8U5zmzDn7ks5sq-KxgaJpZM4P0nAr . https://github.com/notifications/beacon/APZMZ_ux0GChZbX-5rpDia5ZzjQURIhXks5sq-KxgaJpZM4P0nAr.gif
I am using ubuntu, is this what do you mean flavor? Thanks
I was wondering how you built the halide you are using?
Which version of llvm source ? version of Halide source?
Are you using latest versions of Halide and LLVM
Or are you using something prebuilt? If so where did you acquire it?
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
From: Sam [mailto:[email protected]] Sent: Tuesday, October 10, 2017 6:03 PM To: halide/Halide [email protected] Cc: ronlieb [email protected]; Comment [email protected] Subject: Re: [halide/Halide] Build error when make hexagon_benchmarks (#2428)
I am using ubuntu, is this what do you mean flavor? Thanks
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/halide/Halide/issues/2428#issuecomment-335633193 , or mute the thread https://github.com/notifications/unsubscribe-auth/APZMZ71UDZ-fqtntbb4Eqv0l01zs4t23ks5sq_e6gaJpZM4P0nAr . https://github.com/notifications/beacon/APZMZw-_Rp3_npT12V-nwWpExNF_rENCks5sq_e6gaJpZM4P0nAr.gif
"The Hexagon backend is currently under development. So it's best to use trunk llvm", so should I follow this to build llvm.
I am using the latest llvm (5.0.0) and halide, both prebuilt. Since I want to put it into Android build tree, I tried to minimum the code to be added. And, in fact, android tree has llvm and clang in it, I am thinking if I can use that directly.
I am wondering where is this? /home/halidenightly/build_bot/worker/linux-64-gcc53-trunk/llvm/lib/CodeGen/LiveVariables.cpp.cpp
Do I have to build halide or llvm to get it?
Trunk LLVM is version 6, not version 5.
Steven, thanks. Do I have to use trunk LLVM?
I'm not sure if version 5 has hexagon support (@ronlieb can comment on that), but I think that trunk LLVM is the only version we're testing hexagon with.
I recommend using trunk version 6, its current, and supported, works well for us :)
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
From: Steven Johnson [mailto:[email protected]] Sent: Wednesday, October 11, 2017 12:04 PM To: halide/Halide [email protected] Cc: ronlieb [email protected]; Mention [email protected] Subject: Re: [halide/Halide] Build error when make hexagon_benchmarks (#2428)
I'm not sure if version 5 has hexagon support (@ronlieb https://github.com/ronlieb can comment on that), but I think that trunk LLVM is the only version we're testing hexagon with.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/halide/Halide/issues/2428#issuecomment-335878573 , or mute the thread https://github.com/notifications/unsubscribe-auth/APZMZ2F66RYatNwzn_ca9i4Nau_r8Aumks5srPUOgaJpZM4P0nAr . https://github.com/notifications/beacon/APZMZ2B0sKm58FIAYL9PQVvf1UkOl-Ibks5srPUOgaJpZM4P0nAr.gif
Installing it now. thanks
I follow the instruction to build llvm trunk, and then run the make under halide/apps/hexagon_benchmarks, still has error
gaussian5x5_generator: /home/halidenightly/build_bot/worker/linux-64-gcc53-trunk/llvm/lib/CodeGen/LiveVariables.cpp:114: void llvm::LiveVariables::MarkVirtRegAliveInBlock(llvm::LiveVariables::VarInfo&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, std::vectorllvm::MachineBasicBlock*&): Assertion `MBB != &MF->front() && "Can't find reaching def for virtreg"' failed. Makefile:88: recipe for target 'bin/arm-64-android/gaussian5x5_hvx128.o' failed
Do I need to build halide? I use prebuilt version.
Thanks
Yes, you should build Halide with latest sources, pointing it to the llvm you built.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
From: Sam [mailto:[email protected]] Sent: Wednesday, October 11, 2017 2:42 PM To: halide/Halide [email protected] Cc: ronlieb [email protected]; Mention [email protected] Subject: Re: [halide/Halide] Build error when make hexagon_benchmarks (#2428)
I follow the instruction to build llvm trunk, and then run the make under halide/apps/hexagon_benchmarks, still has error
gaussian5x5_generator: /home/halidenightly/build_bot/worker/linux-64-gcc53-trunk/llvm/lib/CodeGen/LiveVariables.cpp:114: void llvm::LiveVariables::MarkVirtRegAliveInBlock(llvm::LiveVariables::VarInfo&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, std::vectorllvm::MachineBasicBlock*&): Assertion `MBB != &MF->front() && "Can't find reaching def for virtreg"' failed. Makefile:88: recipe for target 'bin/arm-64-android/gaussian5x5_hvx128.o' failed
Do I need to build halide? I use prebuilt version.
Thanks
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/halide/Halide/issues/2428#issuecomment-335925334 , or mute the thread https://github.com/notifications/unsubscribe-auth/APZMZ8P9g_z7SJbZV1mLpJqoRBXJVlreks5srRoggaJpZM4P0nAr . https://github.com/notifications/beacon/APZMZ9VdkgIm2kzYlz3uOY6sO-rvNf4Wks5srRoggaJpZM4P0nAr.gif
I removed gaussian5x5, just to verify building process. It passed all the way to "adb push ...".
Since I do not have a phone connected to this linux machine ( I use a windows PC to test our phone, driver is not available for linux), I tried to get the executable on PC to run test.
But, when the build fails, it removes all output, including bin/process-arm-64-android.
Could anyone show me how to get rid of this rm to keep the executable?
Thanks
adb shell /data/process-arm-64-android -n 10 rm bin/arm-64-android/filters.a bin/conv3x3_generator bin/sobel_generator bin/arm-64-android/sobel_hvx128.o bin/arm-64-android/conv3x3a16_cpu.o bin/arm-64-android/conv3x3a32_hvx128.o bin/arm-64-android/median3x3_hvx64.o bin/arm-64-android/dilate3x3_cpu.o bin/arm-64-android/sobel_hvx64.o bin/arm-64-android/dilate3x3_hvx64.o bin/arm-64-android/conv3x3a32_hvx64.o bin/median3x3_generator bin/arm-64-android/median3x3_cpu.o bin/arm-64-android/conv3x3a16_hvx128.o bin/process-arm-64-android bin/dilate3x3_generator bin/arm-64-android/sobel_cpu.o bin/arm-64-android/dilate3x3_hvx128.o bin/arm-64-android/conv3x3a32_cpu.o bin/arm-64-android/conv3x3a16_hvx64.o bin/arm-64-android/median3x3_hvx128.o
What do we expect after running hexagon_benchmarks? Here is what I see, nothing else? or I did something wrong?
adb shell /data/process-arm-64-android cpu 10 Running conv3x3a16...
adb shell /data/process-arm-64-android hvx64 10 Running conv3x3a16...
adb shell /data/process-arm-64-android hvx128 10 Running conv3x3a16...
I believe if you add a line to the top of your makefile
.SECONDARY:
It will stop the removal of the intermediate files
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
From: Sam [mailto:[email protected]] Sent: Wednesday, October 11, 2017 6:53 PM To: halide/Halide [email protected] Cc: ronlieb [email protected]; Mention [email protected] Subject: Re: [halide/Halide] Build error when make hexagon_benchmarks (#2428)
I removed gaussian5x5, just to verify building process. It passed all the way to "adb push ...".
Since I do not have a phone connected to this linux machine ( I use a windows PC to test our phone, driver is not available for linux), I tried to get the executable on PC to run test.
But, when the build fails, it removes all output, including bin/process-arm-64-android.
Could anyone show me how to get rid of this rm to keep the executable?
Thanks
adb shell /data/process-arm-64-android -n 10 rm bin/arm-64-android/filters.a bin/conv3x3_generator bin/sobel_generator bin/arm-64-android/sobel_hvx128.o bin/arm-64-android/conv3x3a16_cpu.o bin/arm-64-android/conv3x3a32_hvx128.o bin/arm-64-android/median3x3_hvx64.o bin/arm-64-android/dilate3x3_cpu.o bin/arm-64-android/sobel_hvx64.o bin/arm-64-android/dilate3x3_hvx64.o bin/arm-64-android/conv3x3a32_hvx64.o bin/median3x3_generator bin/arm-64-android/median3x3_cpu.o bin/arm-64-android/conv3x3a16_hvx128.o bin/process-arm-64-android bin/dilate3x3_generator bin/arm-64-android/sobel_cpu.o bin/arm-64-android/dilate3x3_hvx128.o bin/arm-64-android/conv3x3a32_cpu.o bin/arm-64-android/conv3x3a16_hvx64.o bin/arm-64-android/median3x3_hvx128.o
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/halide/Halide/issues/2428#issuecomment-335980775 , or mute the thread https://github.com/notifications/unsubscribe-auth/APZMZ7sv0F4OQ1-NNjXTjJkViKnJKX8xks5srVTtgaJpZM4P0nAr . https://github.com/notifications/beacon/APZMZ9GG4t_2Pv6wbl3vnwA85J_nRxJ4ks5srVTtgaJpZM4P0nAr.gif
Please gather some debug info , by running
adb logcat
when you run one of your executables on device.
Look for error messages related to the exection of the halide program
It will help determine what is going wrong.
Did you push support libraries to the MTP ?
adb push arm-32-android/libhalide_hexagon_host.so /system/lib/
adb push arm-64-android/libhalide_hexagon_host.so /system/lib64/
adb push v60/libhalide_hexagon_remote_skel.so /system/lib/rfsa/adsp/
Also, does your device have a test signature installed?
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
From: Sam [mailto:[email protected]] Sent: Wednesday, October 11, 2017 7:10 PM To: halide/Halide [email protected] Cc: ronlieb [email protected]; Mention [email protected] Subject: Re: [halide/Halide] Build error when make hexagon_benchmarks (#2428)
What do we expect after running hexagon_benchmarks? Here is what I see, nothing else? or I did something wrong?
adb shell /data/process-arm-64-android cpu 10 Running conv3x3a16...
adb shell /data/process-arm-64-android hvx64 10 Running conv3x3a16...
adb shell /data/process-arm-64-android hvx128 10 Running conv3x3a16...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/halide/Halide/issues/2428#issuecomment-335983336 , or mute the thread https://github.com/notifications/unsubscribe-auth/APZMZww6RPgM5z2I7d_guOtxZpxCzRZ2ks5srVjrgaJpZM4P0nAr . https://github.com/notifications/beacon/APZMZ3DPmtIRVXmhl6MEdiBPttzd4F94ks5srVjrgaJpZM4P0nAr.gif
Ron, I tried MTP and other 2 phones from different manufactures, same results.
I did push all libraries.
Below are log related to halide:
Line 79743: 10-12 17:42:33.137 3032 3035 V /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:194: fopen success: /system/lib/rfsa/adsp/libhalide_hexagon_remote_skel.so Line 79746: 10-12 17:42:33.146 3032 3032 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79746: 10-12 17:42:33.146 3032 3032 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79748: 10-12 17:42:33.147 3032 3032 I halide : Error: remote_set_performance_mode failed. Line 79805: 10-12 17:42:34.341 3047 3049 V /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:194: fopen success: /system/lib/rfsa/adsp/libhalide_hexagon_remote_skel.so Line 79808: 10-12 17:42:34.349 3047 3047 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79808: 10-12 17:42:34.349 3047 3047 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79810: 10-12 17:42:34.350 3047 3047 I halide : Error: remote_set_performance_mode failed. Line 79853: 10-12 17:42:35.494 3059 3061 V /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:194: fopen success: /system/lib/rfsa/adsp/libhalide_hexagon_remote_skel.so Line 79856: 10-12 17:42:35.499 3059 3059 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79856: 10-12 17:42:35.499 3059 3059 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79858: 10-12 17:42:35.501 3059 3059 I halide : Error: remote_set_performance_mode failed.
Hi Sam,
You are making progress.
You are now at the point where the shared libraries are blocked by the signature verification that exists on the hexagon cpu.
Assuming you are running on a development MTP or dragonboard, you should be able to generate a debug signature using the Qualcomm Hexagon SDK tools, and then install it.
If you are trying to run a production device, you will need to get the OEM to sign your shared libriares.
BTW, if you would be willing to contact me at my work email, I have some questions for you.
ronl @ quicinc dot com
Thanks,
Ron
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
From: Sam [mailto:[email protected]] Sent: Thursday, October 12, 2017 12:48 PM To: halide/Halide [email protected] Cc: ronlieb [email protected]; Mention [email protected] Subject: Re: [halide/Halide] Build error when make hexagon_benchmarks (#2428)
Ron, I tried MTP and other 2 phones from different manufactures, same results.
I did push all libraries.
Below are log related to halide:
Line 79743: 10-12 17:42:33.137 3032 3035 V /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:194: fopen success: /system/lib/rfsa/adsp/libhalide_hexagon_remote_skel.so Line 79746: 10-12 17:42:33.146 3032 3032 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79746: 10-12 17:42:33.146 3032 3032 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79748: 10-12 17:42:33.147 3032 3032 I halide : Error: remote_set_performance_mode failed. Line 79805: 10-12 17:42:34.341 3047 3049 V /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:194: fopen success: /system/lib/rfsa/adsp/libhalide_hexagon_remote_skel.so Line 79808: 10-12 17:42:34.349 3047 3047 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79808: 10-12 17:42:34.349 3047 3047 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79810: 10-12 17:42:34.350 3047 3047 I halide : Error: remote_set_performance_mode failed. Line 79853: 10-12 17:42:35.494 3059 3061 V /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:194: fopen success: /system/lib/rfsa/adsp/libhalide_hexagon_remote_skel.so Line 79856: 10-12 17:42:35.499 3059 3059 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79856: 10-12 17:42:35.499 3059 3059 D /data/process-arm-64-android: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:846: Error fffffffb: remote handle open domain failed. domain 0, name halide_hexagon_remote, dlerror signature verify start failed for libhalide_hexagon_remote_skel.so Line 79858: 10-12 17:42:35.501 3059 3059 I halide : Error: remote_set_performance_mode failed.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/halide/Halide/issues/2428#issuecomment-336214063 , or mute the thread https://github.com/notifications/unsubscribe-auth/APZMZxVWKwAEu28PS41apNOaaTiKnbK_ks5srlDLgaJpZM4P0nAr . https://github.com/notifications/beacon/APZMZxx7T0Eoo3IQVjCHQoR0tx51CFPrks5srlDLgaJpZM4P0nAr.gif
Ron, I am working on it.
I though this signature part was taken care of by Halide build tools.
Will contact you.
Do we need to sign all 3 files? arm-32-android/libhalide_hexagon_host.so arm-64-android/libhalide_hexagon_host.so libhalide_hexagon_remote_skel.so
And from the doc, I also need to push testsig-0xdeff1ee2.so. right?
the executable does not need to sign, right?
I pushed everything, reboot, but still has same error.
Doc says python elfsigner.py -t SERIALNUM -o [OUTPUTDIR], it is understandable. But for "python elfsigner.py -i INFILE -o [OUTDIR]", does it need phone's serial number when signing? Where it gets the serial number if not in the command line?
Thanks