Skip to content

Support for arch native on mac #3153

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

Merged

Conversation

AlexandreEichenberger
Copy link
Collaborator

The -march=native results in a apple-m1 arch (or derivatives) on Macs, which is not recognized by the onnx-mlir simd code generator as well as llc.

Add here the code to handle this properly. Also added a print of the native machine being detected under the verbose flag -v so that we may discover what machine is actually compiled for.

@@ -1413,11 +1417,11 @@ void initCompilerConfig() {
setLLVMOption(getLLVMOption() + " --enable-unsafe-fp-math");
}

if (march == "z17")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zXX or archYY are equally recognized, so no need to convert the one into the other

Copy link
Collaborator

@chentong319 chentong319 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@AlexandreEichenberger AlexandreEichenberger merged commit 4e7f135 into onnx:main May 13, 2025
7 checks passed
@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #15632 [push] null... failed after 1 hr 11 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #16687 [push] null... failed after 1 hr 12 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #16689 [push] null... failed after 1 hr 30 min

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.

3 participants