Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

compile: update gcc flags#209

Closed
jasperzhong wants to merge 2 commits into
bytedance:masterfrom
jasperzhong:gcc-flags
Closed

compile: update gcc flags#209
jasperzhong wants to merge 2 commits into
bytedance:masterfrom
jasperzhong:gcc-flags

Conversation

@jasperzhong

Copy link
Copy Markdown
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

ymjiang commented Feb 20, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

@ymjiang Have you tested this?

@ymjiang

ymjiang commented Mar 21, 2020

Copy link
Copy Markdown
Member

@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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants