Skip to content

Allow clang for ThunderX2 config#492

Merged
devinamatthews merged 1 commit intomasterfrom
thunderx2-clang
Jun 19, 2021
Merged

Allow clang for ThunderX2 config#492
devinamatthews merged 1 commit intomasterfrom
thunderx2-clang

Conversation

@devinamatthews
Copy link
Copy Markdown
Member

Needed for compiling on e.g. Mac M1. AFAIK clang supports the same -mcpu flag for ThunderX2 as gcc.

Needed for compiling on e.g. Mac M1. AFAIK clang supports the same -mcpu flag for ThunderX2 as gcc.
@figual
Copy link
Copy Markdown
Collaborator

figual commented Apr 14, 2021

Issues #207 and #421 will rise compiling ARM64 microkernels with clang. I am working on reducing register pressure to solve the issue precisely to compile for M1 if you are interested. You can install gcc in the meanwhile :)

@devinamatthews
Copy link
Copy Markdown
Member Author

I'm told homebrew isn't production-ready on M1. What is the recommended way to install gcc?

@jdiamondGitHub
Copy link
Copy Markdown
Member

Issues #207 and #421 will rise compiling ARM64 microkernels with clang. I am working on reducing register pressure to solve the issue precisely to compile for M1 if you are interested. You can install gcc in the meanwhile :)

In reviewing the clang gnu assembly issue, are you saying there is no way for clang assembly to access half the registers? Or does clang just have a different syntax that we could use and thereby convert the kernel to a format that would work? (Porting kernels to M1) Thanks.

@jdiamondGitHub
Copy link
Copy Markdown
Member

test post

@jdiamondGitHub
Copy link
Copy Markdown
Member

Figual, is your experience that there is no way clang inline assembly can access half the registers on ARM? Or could we port to clang just by rewriting the assembly in a different syntax? Thanks.

@devinamatthews
Copy link
Copy Markdown
Member Author

@jdiamondGitHub I don't think it's that clang can only access half the registers, just that for some reason the compiler keeps one of the registers for itself (like %rbp is sometimes reserved in x86).

@jdiamondGitHub
Copy link
Copy Markdown
Member

jdiamondGitHub commented Apr 16, 2021 via email

@jdiamondGitHub
Copy link
Copy Markdown
Member

jdiamondGitHub commented Apr 16, 2021 via email

@jdiamondGitHub
Copy link
Copy Markdown
Member

jdiamondGitHub commented Apr 16, 2021 via email

@jdiamondGitHub
Copy link
Copy Markdown
Member

jdiamondGitHub commented Apr 16, 2021 via email

@xrq-phys
Copy link
Copy Markdown
Collaborator

Folks,

I'd like to suggest that rather than using ThunderX config for Arm Mac, let's init a new config for Apple since cache size of Firestorm & Icestorm is much larger than those of Cortex-A57.

This is a simple comparison between config cortexa57 (roughly the same as thunderx2) and a slightly tuned one:
output_st_dgemm_asm_blis_firestorm_tag0

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

Successfully merging this pull request may close these issues.

4 participants