Got it

Correct header and shared object files for ACL development

Latest reply: Nov 12, 2020 12:23:58 487 7 0 0 0

Hi,


I need to know the header file & shared object library correspondence in order to make my own libACL based development.


I run the Ascend-Toolkit-20.0.RC1-arm64-linux_gcc7.3.0.run scripts


After that the header files for libACL seem to be here:


$HOME/Ascend/ascend-toolkit/20.0.RC1/acllib_linux.arm64/include/acl


But where are the shared object (.so) library files referred by those header files?


Are they in 


$HOME/Ascend/ascend-toolkit/20.0.RC1/acllib_linux.arm64/lib64/

(there are libacl_cblas.so, libacl_dvpp.so, libruntime.so, libascendcl.so, etc.) ?


Or in


$HOME/Ascend/ascend-toolkit/20.0.RC1/acllib_linux.arm64/lib64/stub

(there we have some of the same files again) ?


Also, if the SD card has been prepared with the scripts, there appears a directory


$HOME/Ascend/acllib/lib64


Are these directories related somehow, or just the same thing?


I would appreciate if someone would explain the meaning of all these directories & the files therein.


And why not just create a debian package that could be updated as a new version of the toolkit rolls out?  And then use pkg-config with cmake, etc?   


Regards from Helsinki,


Sampsa


P. S. A Bonus question: have you ever come across this?


libruntime.so: undefined symbol: halMemFree

















Hello, dear!
It's nice to meet you in the community.
We're working on your problem. Please be patient.

View more
  • x
  • convention:

question1,you can use the command "find + filename" to find the path of .so files.
View more
  • x
  • convention:

ElSampsa
ElSampsa Created Nov 10, 2020 10:14:32 (0) (0)
But that is exactly the problem. :) there are too many of them in too many places  
Here is example (link-stage) command I'm using (via cmake):

/usr/bin/c++ -rdynamic CMakeFiles/test1.dir/test/test1.cpp.o -o test1
-lpthread -lruntime -lacl_cblas -lacl_dvpp -lacl_retr -lascendcl
-L/home/HwHiAiUser/Ascend/ascend-toolkit/20.0.RC1/acllib_linux.arm64/lib64

That results in lots of undefined references from libruntime.so: "undefined reference
to halMemFree", etc.

Maybe it's the order of the inclusion of the libraries (i.e. "-lascendcl" should become first or something like that) ?

Or maybe I should use the .so files that where already on the SD card after installation (see my original post) ?
View more
  • x
  • convention:

One more clarification: I am doing the compilation on-device (i.e. I'm logged into the atlas 200 and do all compiations therein "on-board")
View more
  • x
  • convention:

I was able to solve this.  This is how it goes:

When compiling, one should use the header files in

$HOME/Ascend/ascend-toolkit/20.0.RC1/acllib_linux.arm64/include/acl

LOGICALLY thinking, the shared object files would then be in these directories:

$HOME/Ascend/ascend-toolkit/20.0.RC1/acllib_linux.arm64/lib64/
$HOME/Ascend/ascend-toolkit/20.0.RC1/acllib_linux.arm64/lib64/stub

But WARNING: DO NOT USE THE .so files therein..!  They lack lots of symbols and are broken.

They are only for distraction.  Correct header and shared object files for ACL development-3545111-1

When linking, one should use the object files here instead:

$HOME/Ascend/acllib/lib64

I hope someone files this usefull.

View more
  • x
  • convention:

One final observation:

libACL comes in a different package than the toolkit & libraries between the two should not be mixed.

They have similar .so files, but it seems that the toolkit ships with a different version of libACL than the libACL package ment for application development. Toolkit also needs compilation of pyACL and all kinds of extra stuff.

View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.