-
Notifications
You must be signed in to change notification settings - Fork 86
microbenchmark - CPU Stream Benchmark Revise #712
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
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e00858a
Revise cpu_stream benchmark.
b5a41c8
Enable cpu_stream in common.
f7032f6
Decrease default stream array size.
4e88409
Add default bin in unittest.
77beddd
Remove exe from bins' name.
71061e5
Remove exe from bin names.
2311870
Merge branch 'main' into hongtao/cpu-stream-revise
polarG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,47 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT license. | ||
|
|
||
| GENFLAGS := -DSTREAM_ARRAY_SIZE=400000000 | ||
| GENFLAGS := -DSTREAM_ARRAY_SIZE=120000000 | ||
| ZEN3FLAGS := -DSTREAM_ARRAY_SIZE=400000000 -march=znver3 | ||
| ZEN4FLAGS := -DSTREAM_ARRAY_SIZE=800000000 -march=znver4 | ||
| NEO2FLAGS := -DSTREAM_ARRAY_SIZE=120000000 -mcpu=neoverse-v2 | ||
|
|
||
| GEN_OUTPUT := streamx86.exe | ||
| ZEN3_OUTPUT := streamZen3.exe | ||
| ZEN4_OUTPUT := streamZen4.exe | ||
| NEO2_OUTPUT := streamNeo2.exe | ||
| GEN_OUTPUT := stream | ||
| ZEN3_OUTPUT := streamZen3 | ||
| ZEN4_OUTPUT := streamZen4 | ||
| NEO2_OUTPUT := streamNeo2 | ||
|
|
||
| ALL_TARGETS := GEN | ||
|
|
||
| ARCH := $(shell uname -m) | ||
|
|
||
| # ARM64 build gets NEO2 added | ||
| ifeq ($(ARCH), aarch64) | ||
| CFLAGS := -Ofast -fopenmp -DNTIMES=200 | ||
| CC := gcc | ||
| all: NEO2 | ||
| else | ||
| CC := /opt/AMD/aocc-compiler-4.0.0/bin/clang | ||
| CFLAGS := -Ofast -mcmodel=large -mavx2 -ffp-contract=fast -lomp -fopenmp -fnt-store=aggressive -DNTIMES=10 | ||
| all: ZEN3 ZEN4 X86 | ||
| CC := gcc | ||
| CFLAGS := -Ofast -fopenmp -DNTIMES=200 | ||
| ALL_TARGETS += NEO2 | ||
| endif | ||
|
|
||
| # AMD AOCC clang present? add ZEN3 and ZEN4 | ||
| ifneq ("$(wildcard /opt/AMD/aocc-compiler-4.0.0/bin/clang)","") | ||
| CC := /opt/AMD/aocc-compiler-4.0.0/bin/clang | ||
| CFLAGS := -Ofast -mcmodel=large -mavx2 -ffp-contract=fast -lomp -fopenmp \ | ||
| -fnt-store=aggressive -DNTIMES=10 | ||
| ALL_TARGETS += ZEN3 ZEN4 | ||
| endif | ||
|
|
||
| ZEN3: stream.c | ||
| # the one all: definition | ||
| all: $(ALL_TARGETS) | ||
|
|
||
| GEN: | ||
| $(CC) $(CFLAGS) $(GENFLAGS) stream.c -o $(GEN_OUTPUT) | ||
| ZEN3: | ||
| $(CC) $(CFLAGS) $(ZEN3FLAGS) stream.c -o $(ZEN3_OUTPUT) | ||
| ZEN4: | ||
| $(CC) $(CFLAGS) $(ZEN4FLAGS) stream.c -o $(ZEN4_OUTPUT) | ||
| X86: | ||
| $(CC) $(CFLAGS) $(GENFLAGS) stream.c -o $(GEN_OUTPUT) | ||
| NEO2: | ||
| $(CC) $(CFLAGS) $(NEO2FLAGS) stream.c -o $(NEO2_OUTPUT) | ||
|
|
||
| ifeq ($(ARCH), aarch64) | ||
| # clean up the generated files | ||
| clean: | ||
| rm $(NEO2_OUTPUT) | ||
| else | ||
| clean: | ||
| rm $(GEN_OUTPUT) $(ZEN3_OUTPUT) $(ZEN4_OUTPUT) | ||
| endif | ||
| rm -f $(GEN_OUTPUT) $(ZEN3_OUTPUT) $(ZEN4_OUTPUT) $(NEO2_OUTPUT) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.