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: update gcc flags #209

Closed
wants to merge 2 commits into from
Closed

Conversation

jasperzhong
Copy link
Contributor

I tried Ofast instead of O2. I do observe somewhat performance gain in my experiments, roughly from 4% to 20%, without accuracy loss. Ofast enables all O3 optimizations and some non-standard optimizations according to gcc docs.

Also, I tried march=native to replace avx flags. According to gcc docs, it enables all instruction subsets supported by the local machine, including avx if possible. So I suppose the flag is more general.

@ymjiang
Copy link
Member

ymjiang commented Feb 20, 2020

Thank you! We will look into this and see if it also boosts our performance.

@ymjiang ymjiang self-requested a review February 20, 2020 05:29
@bobzhuyb
Copy link
Member

@ymjiang Have you tested this?

@ymjiang
Copy link
Member

ymjiang commented Mar 21, 2020

@bobzhuyb Yes, but did not see performance gain.

@vycezhong Can you please share more context, i.e., In what kind of scenario did you see 4-20% improvement?

@jasperzhong
Copy link
Contributor Author

That's exact the same MNIST exp I mentioned in the #225.

I just tried to reproduce the results but failed. Maybe 4%-20% is due to some turbulence.

@jasperzhong jasperzhong deleted the gcc-flags branch March 21, 2020 04:08
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