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

Compile Litl library on ARM architecture #5

Open
SpicySoupDKQ opened this issue May 16, 2022 · 8 comments
Open

Compile Litl library on ARM architecture #5

SpicySoupDKQ opened this issue May 16, 2022 · 8 comments

Comments

@SpicySoupDKQ
Copy link

Hi @HugoGuiroux
I'm trying to compile Litl library on ARM architecture and replace #include <xmmintrin.h> header file with sse2neon
(sse2neon see https://github.com/DLTcollab/sse2neon/)
The error encountered in CLHT/include/atiomic_ops.h is as follows:
error: impossible constraint in ‘asm’ asm volatile("xchgb %0,%1"
How to solve the above problems to complete the compilation and operation of Litl on the ARM architecture.
Please let me know if you have a solution, thanks a lot.

@goldsteinn
Copy link

goldsteinn commented May 17, 2022

Hi @HugoGuiroux I'm trying to compile Litl library on ARM architecture and replace #include <xmmintrin.h> header file with sse2neon (sse2neon see https://github.com/DLTcollab/sse2neon/) The error encountered in CLHT/include/atiomic_ops.h is as follows: error: impossible constraint in ‘asm’ asm volatile("xchgb %0,%1" How to solve the above problems to complete the compilation and operation of Litl on the ARM architecture. Please let me know if you have a solution, thanks a lot.

Thats x86_64 inline assembly. This library is not really portable cross arch. Your going to have to at the very least replace all the inline assembly with the corresponding aarch64 code and probably fix a litany of bugs due missing memory barriers.

Edit: If you do go about porting this to aarch64 can you ping back here with the fork?

@SpicySoupDKQ
Copy link
Author

Hi @HugoGuiroux I'm trying to compile Litl library on ARM architecture and replace #include <xmmintrin.h> header file with sse2neon (sse2neon see https://github.com/DLTcollab/sse2neon/) The error encountered in CLHT/include/atiomic_ops.h is as follows: error: impossible constraint in ‘asm’ asm volatile("xchgb %0,%1" How to solve the above problems to complete the compilation and operation of Litl on the ARM architecture. Please let me know if you have a solution, thanks a lot.

Thats x86_64 inline assembly. This library is not really portable cross arch. Your going to have to at the very least replace all the inline assembly with the corresponding aarch64 code and probably fix a litany of bugs due missing memory barriers.

Edit: If you do go about porting this to aarch64 can you ping back here with the fork?

I have solved the above problems, compiled and generated .sh files, but reported errors during use
'undefined symbol: CAS_U64'
Similar errors are as follows:
'undefined symbol: PREFETCHW'
'undefined symbol: getticks'
'undefined symbol: _mm_mfence'
'undefined symbol: FAI_U32'
I tried to modify the following 'platform-specific definitions' in line 205 in litl/obj/CLTH/ssmem/include/ssmem.h to define the corresponding functions according to the ARM architecture
But the error is still not resolved

@goldsteinn
Copy link

goldsteinn commented May 18, 2022

The runtime errors are because the code is compiled down to a shared library and its expecting to find those symbols in the executable your running.

You need to find where each of them is defined and re-define them with the corresponding aarch64 instructions.

@SpicySoupDKQ
Copy link
Author

The runtime errors are because the code is compiled down to a shared library and its expecting to find those symbols in the executable your running.

You need to find where each of them is defined and re-define them with the corresponding aarch64 instructions.

Thanks, the problem has been solved

@SpicySoupDKQ
Copy link
Author

Edit: If you do go about porting this to aarch64 can you ping back here with the fork?
Hi @goldsteinn,I've done porting code from x86 to ARM,But it includes modifications to ssmem and sspfd under CLHT. If I upload a new branch, the above two libraries will also be uploaded together

@goldsteinn
Copy link

I see, any chance you can post the patches from master/HEAD or just push a fork without those two library and references to the versions?

If not cest la vie.

@iamqk
Copy link

iamqk commented Nov 28, 2022

The runtime errors are because the code is compiled down to a shared library and its expecting to find those symbols in the executable your running.
You need to find where each of them is defined and re-define them with the corresponding aarch64 instructions.

Thanks, the problem has been solved

Would you please kindly share your _mm_mfence implement file?

@iamqk
Copy link

iamqk commented Nov 29, 2022

DLTcollab/sse2neon#554 (comment)

problem sovled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants