Ehsan-aghapour / ARMCL-pipe-all

MIT License
5 stars 1 forks source link

Unable to rebuild the ARM_CL and follow the instruction to reproduce the result #1

Closed HungYangChang closed 2 years ago

HungYangChang commented 3 years ago

Output of 'strings libarm_compute.so | grep arm_compute_version': arm_compute_version=v21.02 Build options: {'Werror': '0', 'debug': '1', 'asserts': '0', 'neon': '1', 'opencl': '1', 'os': 'linux', 'arch': 'arm64-v8a'} Git hash=b'5682f000a9e6682be0cf3d2ef5289851cd933433'

Platform: Hikey970

Operating System: Linux

Problem description:

Hello Ehsan. First of all, Thanks for open source this great project.

I try to replicate your result. I download your project by the following command. (I guess the README should be updated ) git clone https://github.com/Ehsan-aghapour/ARMCL-pipe-all/ But Here are some problems I faced:

  1. I used scons Werror=0 -j16 debug=0 asserts=0 neon=1 opencl=1 os=linux arch=arm64-v8a to build the ARM-CL. However, it shows the following warnings and errors:

image aarch64-linux-gnu-g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions. scons: *** [build/src/graph/backends/NEON/NEFunctionFactory.os] Error 4 aarch64-linux-gnu-g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions. scons: *** [build/src/graph/backends/CL/CLFunctionsFactory.os] Error 4 examples/graph_mobilenet_all_pipe_sync.cpp: In constructor ‘GraphMobilenetExample::GraphMobilenetExample()’: examples/graph_mobilenet_all_pipe_sync.cpp:67:5: warning: ‘GraphMobilenetExample::input_descriptor2’ should be

  1. I tried following the "Running in Linux part" : cp /system/lib64/egl/libGLES_mali.so $lib_dir/libOpenCL.so
    But May I ask when Can I find the libOpenCL.so? image

3.I tried to use the following command to test ./build/examples/graph_alexnet_all_pipe_sync --threads=4 --threads2=2 --total_cores=6 --partition_point=3 --partition_point2=5 --order=G-L-B --n=60

but it shows these errors, I guess maybe this is due to unsuccessful building. ./build/examples/graph_alexnet_all_pipe_sync: symbol lookup error: /home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/library/libarm_compute_graph.so: undefined symbol: _ZN11arm_compute7logging14LoggerRegistry3getEv

  1. Also, I follow and use the following "Running in Linux part"

image but it turns out with the following messages: WARNING: Skipping invalid option 'Neon'! WARNING: Skipping invalid option '/home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/alexnet/'! WARNING: Skipping invalid option '/home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/alexnet//go_kart.ppm'! WARNING: Skipping invalid option '/home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/alexnet//labels.txt'!

Thanks again :)

Ehsan-aghapour commented 3 years ago

Dear Hung-Yang,

Let start solving the problem, step by step.

First, let compile it successfully, then go to the running part.

What command do you exactly use for compiling?

Best, Ehsan

On Fri, Aug 27, 2021 at 4:19 AM Hung-Yang Chang @.***> wrote:

Output of 'strings libarm_compute.so | grep arm_compute_version': arm_compute_version=v21.02 Build options: {'Werror': '0', 'debug': '1', 'asserts': '0', 'neon': '1', 'opencl': '1', 'os': 'linux', 'arch': 'arm64-v8a'} Git hash=b'5682f000a9e6682be0cf3d2ef5289851cd933433' Platform: Hikey970 Operating System: Linux

Problem description: Hello Ehsan.

I try to replicate your result. I download your project by the following command. (I guess the README should be updated ) git clone https://github.com/Ehsan-aghapour/ARMCL-pipe-all/ https://github.com/Ehsan-aghapour/ARMCL-pipe-all/ But Here are some problems I faced:

  1. I used scons Werror=0 -j16 debug=0 asserts=0 neon=1 opencl=1 os=linux arch=armv7a/arm64-v8a to build the ARM-CL. However, it shows the following warnings and errors:

[image: image] https://user-images.githubusercontent.com/70759685/131060321-16cc7d89-8122-418e-8184-4093d2b05d2b.png aarch64-linux-gnu-g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-6/README.Bugs for instructions. scons: [build/src/graph/backends/NEON/NEFunctionFactory.os] Error 4 aarch64-linux-gnu-g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-6/README.Bugs for instructions. scons: [build/src/graph/backends/CL/CLFunctionsFactory.os] Error 4 examples/graph_mobilenet_all_pipe_sync.cpp: In constructor ‘GraphMobilenetExample::GraphMobilenetExample()’: examples/graph_mobilenet_all_pipe_sync.cpp:67:5: warning: ‘GraphMobilenetExample::input_descriptor2’ should be

  1. I tried following the "Running in Linux part" : cp /system/lib64/egl/libGLES_mali.so $lib_dir/libOpenCL.so But May I ask when Can I find the libOpenCL.so? [image: image] https://user-images.githubusercontent.com/70759685/131061293-de264c19-2fba-4878-89ce-f8e96873346b.png

3.I tried to use the following command to test ./build/examples/graph_alexnet_all_pipe_sync --threads=4 --threads2=2 --total_cores=6 --partition_point=3 --partition_point2=5 --order=G-L-B --n=60

but it shows these errors, I guess maybe this is due to unsuccessful building. ./build/examples/graph_alexnet_all_pipe_sync: symbol lookup error: /home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/library/libarm_compute_graph.so: undefined symbol: _ZN11arm_compute7logging14LoggerRegistry3getEv

  1. Also, I follow and use the following "Running in Linux part"

[image: image] https://user-images.githubusercontent.com/70759685/131061320-e4e9aa55-e5e4-4fd8-b514-d5049788f958.png but it turns out with the following messages: WARNING: Skipping invalid option 'Neon'! WARNING: Skipping invalid option '/home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/alexnet/'! WARNING: Skipping invalid option '/home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/alexnet//go_kart.ppm'! WARNING: Skipping invalid option '/home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/alexnet//labels.txt'!

Thanks again for open source this good project.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Ehsan-aghapour/ARMCL-pipe-all/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPQ3EYZJVF3VTP3J6BAZQ3T63Y4XANCNFSM5C4SW6MA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--

           Ehsan Aghapour

========================================= M.Sc. Student Department of Computer Engineering Sharif University of Technology Phone: +989372298162

HungYangChang commented 3 years ago

Hello Ehsan,

Thanks for the reply.

I used the following command to build scons Werror=0 -j16 debug=0 asserts=0 neon=1 opencl=1 os=linux arch=arm64-v8a But it always show up "exhaust memory", so I decrease the thread number to 4. scons Werror=0 -j4 debug=0 asserts=0 neon=1 opencl=1 os=linux arch=arm64-v8a

But It would show a lots of warnings and finally stop with an error. scons: *** [build/src/graph/backends/NEON/NEFunctionFactory.os] Error 4 aarch64-linux-gnu-g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.

By the way, the platform I am using is Hikey970: image

Thanks :)

Ehsan-aghapour commented 3 years ago

Hi Hung-Yang,

It seems that you are building the library on Khadas board. Use build=native in your command:

scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native

Best, Ehsan

On Fri, Aug 27, 2021 at 3:03 PM Hung-Yang Chang @.***> wrote:

Hello Ehsan,

Thanks for the reply.

I used the following command to build scons Werror=0 -j16 debug=0 asserts=0 neon=1 opencl=1 os=linux arch=arm64-v8a But it always show up "exhaust memory", so I decrease the thread number to 4. scons Werror=0 -j4 debug=0 asserts=0 neon=1 opencl=1 os=linux arch=arm64-v8a

But It would show a lots of warnings and finally stop with an error. scons: *** [build/src/graph/backends/NEON/NEFunctionFactory.os] Error 4 aarch64-linux-gnu-g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-6/README.Bugs for instructions.

By the way, the platform I am using is Hikey970: [image: image] https://user-images.githubusercontent.com/70759685/131130933-42938036-7758-4f2e-9d64-8a430fa5ece3.png

Thanks :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ehsan-aghapour/ARMCL-pipe-all/issues/1#issuecomment-907186565, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPQ3E566Z4FESA5D5BP2HDT66EKXANCNFSM5C4SW6MA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--

           Ehsan Aghapour

========================================= Ph.D. Student Department of Computer Science University of Amsterdam (UvA) @.***

Ehsan-aghapour commented 3 years ago

Let me see log messages if you face with error.

On Fri, Aug 27, 2021 at 3:23 PM Ehsan Aghapour @.***> wrote:

Hi Hung-Yang,

It seems that you are building the library on Khadas board. Use build=native in your command:

scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native

Best, Ehsan

On Fri, Aug 27, 2021 at 3:03 PM Hung-Yang Chang @.***> wrote:

Hello Ehsan,

Thanks for the reply.

I used the following command to build scons Werror=0 -j16 debug=0 asserts=0 neon=1 opencl=1 os=linux arch=arm64-v8a But it always show up "exhaust memory", so I decrease the thread number to 4. scons Werror=0 -j4 debug=0 asserts=0 neon=1 opencl=1 os=linux arch=arm64-v8a

But It would show a lots of warnings and finally stop with an error. scons: *** [build/src/graph/backends/NEON/NEFunctionFactory.os] Error 4 aarch64-linux-gnu-g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-6/README.Bugs for instructions.

By the way, the platform I am using is Hikey970: [image: image] https://user-images.githubusercontent.com/70759685/131130933-42938036-7758-4f2e-9d64-8a430fa5ece3.png

Thanks :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ehsan-aghapour/ARMCL-pipe-all/issues/1#issuecomment-907186565, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPQ3E566Z4FESA5D5BP2HDT66EKXANCNFSM5C4SW6MA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--

           Ehsan Aghapour

========================================= Ph.D. Student Department of Computer Science University of Amsterdam (UvA) @.***

--

           Ehsan Aghapour

========================================= Ph.D. Student Department of Computer Science University of Amsterdam (UvA) @.***

HungYangChang commented 3 years ago

Hello Ehsan,

Thanks for the instant reply, I will try this command later and update you since my other lab members are using the board now. :)

Thanks!

Ehsan-aghapour commented 3 years ago

You're welcome.

Which university are you?

What is the purpose of using this project?

Best, Ehsan

On Fri, Aug 27, 2021, 3:29 PM Hung-Yang Chang @.***> wrote:

Hello Ehsan,

Thanks for the instant reply, I will try this command later and update you since my other lab members are using the board now. :)

Thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ehsan-aghapour/ARMCL-pipe-all/issues/1#issuecomment-907204114, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPQ3E2BZGHMDKOOH7TC7FLT66HMJANCNFSM5C4SW6MA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

HungYangChang commented 3 years ago

Hello Ehsan,

I am 2nd master's graduate student at McGill ECE. I first saw Dr. Siqi paper, and then came across your model. Since I am working on the inference BERT model on the edge platform for my thesis, all of your models is very helpful as a reference.

Ehsan-aghapour commented 3 years ago

Great. Interesting subject! I wish luck for you!

I worked on Hikey board at past. I cannot order it at Europe! (Seems it is out of stock here). I may search again may could find it online.

If you face problem in using pipe-all framework don't hesitate to ask your questions.

Best, Ehsan

On Friday, August 27, 2021, Hung-Yang Chang @.***> wrote:

Hello Ehsan,

I am 2nd master's graduate student at McGill ECE. I first saw Dr. Siqi paper https://arxiv.org/pdf/1903.05898.pdf, and then came across your model. Since I am working on the inference BERT model on the edge platform for my thesis, all of your models is very helpful as a reference.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ehsan-aghapour/ARMCL-pipe-all/issues/1#issuecomment-907226394, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPQ3E7BXGHKTGTUICNDR43T66LF3ANCNFSM5C4SW6MA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--

           Ehsan Aghapour

========================================= Ph.D. Student Department of Computer Science University of Amsterdam (UvA) @.***

HungYangChang commented 3 years ago

Sorry for the late response. We were re-booting our Hikey 970 so I cannot test it in time. After trying build-up you suggest (scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native), I got the following error:

utils/GraphUtils.cpp: In constructor 'arm_compute::graph_utils::ReceiverAccessor::ReceiverAccessor(bool, unsigned int)': utils/GraphUtils.cpp:212:60: error: unused parameter 'maximum' [-Werror=unused-parameter] ReceiverAccessor::ReceiverAccessor(bool tran, unsigned int maximum) ^~~~~~~ utils/GraphUtils.cpp: In constructor 'arm_compute::graph_utils::ReceiverAccessor2::ReceiverAccessor2(bool, unsigned ``int)': utils/GraphUtils.cpp:219:62: error: unused parameter 'maximum' [-Werror=unused-parameter] ReceiverAccessor2::ReceiverAccessor2(bool tran, unsigned int maximum) ^~~~~~~

image image

I guess I will try to look again at how ARM-CL GitHub suggests us to build and see if it works.

Thanks in advance :)

Ehsan-aghapour commented 3 years ago

Hi,

No problem.

It is a warning that considered it as error. Set werror, debug, asserts flags to 0.

Best, Ehsan

On Tue, Aug 31, 2021, 4:38 PM Hung-Yang Chang @.***> wrote:

Sorry for the late response. We were re-booting our Hikey 970 so I cannot test it in time. After trying build-up you suggest (scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native), I got the following error:

utils/GraphUtils.cpp: In constructor 'arm_compute::graph_utils::ReceiverAccessor::ReceiverAccessor(bool, unsigned int)': utils/GraphUtils.cpp:212:60: error: unused parameter 'maximum' [-Werror=unused-parameter] ReceiverAccessor::ReceiverAccessor(bool tran, unsigned int maximum) ^~~ utils/GraphUtils.cpp: In constructor 'arm_compute::graph_utils::ReceiverAccessor2::ReceiverAccessor2(bool, unsigned ``int)': utils/GraphUtils.cpp:219:62: error: unused parameter 'maximum' [-Werror=unused-parameter] ReceiverAccessor2::ReceiverAccessor2(bool tran, unsigned int maximum) ^~~

[image: image] https://user-images.githubusercontent.com/70759685/131522479-51115dd1-d8e0-447c-b527-e6edd9bf6136.png [image: image] https://user-images.githubusercontent.com/70759685/131522545-7eb3205f-ff09-48fc-8496-20c9bcfa7dc6.png

I guess I will try to look again at how ARM-CL GitHub suggests us to build and see if it works.

Thanks in advance :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ehsan-aghapour/ARMCL-pipe-all/issues/1#issuecomment-909298900, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPQ3E4X2FAMYOQH5QCTKTTT7TSNTANCNFSM5C4SW6MA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

HungYangChang commented 3 years ago

@Ehsan-aghapour

Thanks for your instant reply, I was able to use scons Werror=0 -j4 debug=0 asserts=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native to build the environment on HiKey 970.

After export lib, I was able to ./build/examples/graph_alexnet_all_pipe_sync --threads=4 --threads2=2 --total_cores=6 --partition_point=3 --partition_point2=5 --order=G-L-B --n=60 to benchmark.

The result shows as follow:

./build/examples/graph_alexnet_all_pipe_sync

Threads : 4 Small Cores Threads : 2 Target : CL Data type : F32 Data layout : NHWC Tuner enabled? : false Cache enabled? : false Tuner mode : Normal Tuner file : MLGO file : Fast math enabled? : false Image file : Labels file : transfer Partition point is : 3 Second partition point is : 5 Order is : G-L-B Total number of cores is : 6 Run network for 60 times.

First partition point:3 Second partition point:5 Total parts:8

start running third graph ... start running first graph ... start running second graph ...

Running Inference ...

stage1_input_time: 0.00264753 ms stage1_inference_time: 96.5089 ms stage1_total_time: 96.5115 ms

stage2_input_time: 107.626 ms stage2_inference_time: 22.1759 ms stage2_total_time: 129.802 ms

stage3_input_time: 71.0915 ms stage3_inference_time: 58.6052 ms stage3_total_time: 129.697 ms


Frame rate is: 7.70404 FPS Frame latency is: 356.01 ms


Test passed

Thanks for the help.

HungYangChang commented 3 years ago

However, I was still unable to solve problem 4 in the original question:

I follow and use the following "Running in Linux part"

image

but it turns out with the following messages: WARNING: Skipping invalid option 'Neon'! WARNING: Skipping invalid option '/home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/alexnet/'! WARNING: Skipping invalid option '/home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/alexnet//go_kart.ppm'! WARNING: Skipping invalid option '/home/Micro_SD_shunya/hungyang/ARMCL-pipe-all/alexnet//labels.txt'!

Thanks again :)

Ehsan-aghapour commented 3 years ago

Hi,

Sorry for the late reply. I missed your message.

Would you please let me know the exact command that you use for running?

Best regards, Ehsan

On Fri, Sep 10, 2021, 7:14 AM Hung-Yang Chang @.***> wrote:

Closed #1 https://github.com/Ehsan-aghapour/ARMCL-pipe-all/issues/1.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Ehsan-aghapour/ARMCL-pipe-all/issues/1#event-5282067234, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPQ3E6RSVXHJCALHPXJBK3UBFWJJANCNFSM5C4SW6MA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

HungYangChang commented 3 years ago

Hi @Ehsan-aghapour
No worries, I was able to reproduce part of your work on my own end. I will re-open the issue or open a new issue if I have any questions.

Thanks for your help :)

Ehsan-aghapour commented 3 years ago

Great. You're welcome.

Best, Ehsan

On Fri, Sep 10, 2021, 9:09 AM Hung-Yang Chang @.***> wrote:

Hi @Ehsan-aghapour https://github.com/Ehsan-aghapour No worries, I was able to reproduce part of your work on my own end. I will re-open the issue or open a new issue if I have any questions.

Thanks for your help :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Ehsan-aghapour/ARMCL-pipe-all/issues/1#issuecomment-916625581, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPQ3E72AH7NEXOL4KQJCFDUBGDX3ANCNFSM5C4SW6MA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.