-
Notifications
You must be signed in to change notification settings - Fork 19
[ADD] Neura demo python script #64
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 44 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
0390a96
[Change] default_heterogeneous and Neura Script
MeowMJ 15bfb0f
[UPDATE] default_heterogeneous
MeowMJ 3b2080e
[UPDATE] default_heterogeneous
MeowMJ 5176aa0
[UPDATE] DFG.cpp
MeowMJ 8a7071d
Tan helps with the new bug. Merge branch 'master' of https://github.c…
MeowMJ cbad764
[UPDATE] NeuraDemo.py, relu+histogram.c
MeowMJ 889654f
[UPDATE] NeuraDemo and output
MeowMJ 84416b8
[UODATE] NeuraDemo.py
MeowMJ e7fd994
[UPDATE]python script
MeowMJ 137ad86
[UPDATE] all
MeowMJ b4e4d8c
[DELETE] unnessarsy
MeowMJ 6c54efc
[UPDATE] expandable python demo
MeowMJ 0b15e22
[slove one conflict]
MeowMJ 797f153
[ADD] workflow for tools/expandable
MeowMJ 1598845
[UPDATE] workflow for tools/expandable
MeowMJ 571ef5c
[UPDATE] expandable mapping
MeowMJ 9fbf220
[UPDATE] workflow for tools/expandable
MeowMJ 0fbf202
[UPDATE] workflow for tools/expandable
MeowMJ 432cc6a
[UPDATE] add python env in workflow
MeowMJ 120f845
[UPDATE] add python env in workflow
MeowMJ daf3029
[UPDATE] add python env in workflow
MeowMJ 6a75fb5
[UPDATE] add python env in workflow
MeowMJ 7dab033
[UPDATE] add python env in workflow
MeowMJ 93e807b
[REMOVE] not relavant thing
MeowMJ 6605a75
[ADD] needed space in CGRA.cpp
MeowMJ 7893b65
[UPDATE] scheduler.py and visualization.py
MeowMJ 80505c9
Delete tools/expandable/tmp directory
MeowMJ c8cf535
[UPDATE] python script
MeowMJ 6ab3823
[SOLVE] merge conflict
MeowMJ a1cc3cf
Merge branch 'master' of https://github.com/MeowMJ/CGRA-Mapper
MeowMJ 2c78e86
[DELETE] json and update visualization.py
MeowMJ a50499b
[FIX] error in scheduler.py
MeowMJ 6a63273
[FIX] missing module
MeowMJ 7f6d2ad
[UPDATE] demo.sh
MeowMJ db9ad8c
[UPDATE] fig condig
MeowMJ c7fe250
[UPDATE] schedule hete
MeowMJ b3cbb1b
[TRY] fix git action bug
MeowMJ 9b67f2f
[TRY] fix git action bug
MeowMJ 96c2427
[TRY] fix git action bug
MeowMJ 5227b4f
[TRY] fix git action bug
MeowMJ 27292da
[TRY] fix git action bug
MeowMJ d34c480
[TRY] fix git action bug
MeowMJ 4da85fb
[TRY] fix git action bug
MeowMJ 5ccaebb
[TRY] fix git action bug
MeowMJ 128f2e4
[UPDATE] Fig drawing
MeowMJ 9a0b855
[DEBUG] mismatched coloum
MeowMJ e7b96af
[UPDATE] Fig drawing
MeowMJ 2d6fecf
[DEBUG] mismatched coloum
MeowMJ 04657c0
[UPDATE] final version of python demo
MeowMJ a167a56
[UPDATE] comment the print sentence
MeowMJ 8de59c8
[UPDATE] document name
MeowMJ c31bd19
[UPDATE] shorten CI/CD time
MeowMJ e96323f
[UPDATE] shorten CI/CD time
MeowMJ 157f917
[UPDATE] file structure
MeowMJ 23cd249
[UPDATE] baseline remove hete
MeowMJ 0c858db
[UPDATE] readme
MeowMJ 6a5c05e
[UPDATE] demo testme true
MeowMJ cb5665b
[UPDATE] english comment
MeowMJ 785c335
[UPDATE] english comment
MeowMJ 86d11a7
[UPDATE] TEST CI/CD
MeowMJ 83d3ff7
Merge branch 'master' of https://github.com/tancheng/CGRA-Mapper
MeowMJ 9572c2e
[MERGE] conflict
MeowMJ 976ce4a
[UPDATE] fusionStrategy
MeowMJ efe04cb
[UPDATE] visualizer
MeowMJ ea98d16
[REMOVE] visualizer_copy
MeowMJ 4e1570a
[UPDATE] add label in figs
MeowMJ 8ba2ee0
[UPDATE] relu+histogram
MeowMJ 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,5 @@ build*/ | |
| *.ll | ||
| *.dot | ||
| *.bc | ||
| .vscode/ | ||
| .venv/ | ||
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,2 +1,3 @@ | ||
| clang-12 -emit-llvm -fno-unroll-loops -O3 -o kernel.bc -c kernel.cpp | ||
| #llvm-dis fir.bc -o fir.ll | ||
| clang-12 -emit-llvm -fno-unroll-loops -O0 -o kernel.bc -c kernel.cpp | ||
| llvm-dis-12 kernel.bc -o O0kernel.ll | ||
| #clang-12 -emit-llvm -fno-unroll-loops -mllvm -force-vector-width=4 -O3 -o kernel.bc -c ./_matmul/src/matmul.c |
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,2 +1 @@ | ||
| dot -Tpng _Z6kernelPfS_S_.dot -o kernel.png | ||
|
|
||
| dot -Tpng _Z6kernelPfS_S_.dot -o kernel.png |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| clang-12 -emit-llvm -O3 -fno-unroll-loops -o kernel.bc -c relu.c | ||
| llvm-dis-12 kernel.bc -o kernel.ll | ||
| opt-12 --loop-unroll --unroll-count=4 kernel.bc -o kernel_unroll.bc | ||
| llvm-dis-12 kernel_unroll.bc -o kernel_unroll.ll |
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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "kernel" : "kernel", | ||
| "targetFunction" : false, | ||
| "targetNested" : false, | ||
| "targetLoopsID" : [1], | ||
| "doCGRAMapping" : false, | ||
| "row" : 4, | ||
| "column" : 4, | ||
| "diagonalVectorization" : true, | ||
| "fusionStrategy" : [], | ||
| "isTrimmedDemo" : true, | ||
| "heuristicMapping" : false, | ||
| "bypassConstraint" : 4, | ||
| "isStaticElasticCGRA" : false, | ||
| "precisionAware" : false, | ||
| "ctrlMemConstraint" : 200, | ||
| "regConstraint" : 8 | ||
| } | ||
|
|
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 |
|---|---|---|
| @@ -0,0 +1,217 @@ | ||
| /* | ||
| * Polybench header for instrumentation. | ||
| * | ||
| * Programs must be compiled with `-I utilities utilities/polybench.c' | ||
| * | ||
| * Optionally, one can define: | ||
| * | ||
| * -DPOLYBENCH_TIME, to report the execution time, | ||
| * OR (exclusive): | ||
| * -DPOLYBENCH_PAPI, to use PAPI H/W counters (defined in polybench.c) | ||
| * | ||
| * | ||
| * See README or utilities/polybench.c for additional options. | ||
| * | ||
| */ | ||
| #ifndef POLYBENCH_H | ||
| # define POLYBENCH_H | ||
|
|
||
| # include <stdlib.h> | ||
|
|
||
| /* Array padding. By default, none is used. */ | ||
| # ifndef POLYBENCH_PADDING_FACTOR | ||
| /* default: */ | ||
| # define POLYBENCH_PADDING_FACTOR 0 | ||
| # endif | ||
|
|
||
|
|
||
| /* C99 arrays in function prototype. By default, do not use. */ | ||
| # ifdef POLYBENCH_USE_C99_PROTO | ||
| # define POLYBENCH_C99_SELECT(x,y) y | ||
| # else | ||
| /* default: */ | ||
| # define POLYBENCH_C99_SELECT(x,y) x | ||
| # endif | ||
|
|
||
|
|
||
| /* Scalar loop bounds in SCoPs. By default, use parametric loop bounds. */ | ||
| # ifdef POLYBENCH_USE_SCALAR_LB | ||
| # define POLYBENCH_LOOP_BOUND(x,y) x | ||
| # else | ||
| /* default: */ | ||
| # define POLYBENCH_LOOP_BOUND(x,y) y | ||
| # endif | ||
|
|
||
| /* Use the 'restrict' keyword to declare that the different arrays do not | ||
| * alias. By default, we do not use it as it is only supported in C99 and | ||
| * even here several compilers do not properly get it. | ||
| */ | ||
| # ifdef POLYBENCH_USE_RESTRICT | ||
| # define POLYBENCH_RESTRICT restrict | ||
| # else | ||
| /* default: */ | ||
| # define POLYBENCH_RESTRICT | ||
| # endif | ||
|
|
||
| /* Macros to reference an array. Generic for heap and stack arrays | ||
| (C99). Each array dimensionality has his own macro, to be used at | ||
| declaration or as a function argument. | ||
| Example: | ||
| int b[x] => POLYBENCH_1D_ARRAY(b, x) | ||
| int A[N][N] => POLYBENCH_2D_ARRAY(A, N, N) | ||
| */ | ||
| # ifndef POLYBENCH_STACK_ARRAYS | ||
| # define POLYBENCH_ARRAY(x) *x | ||
| # define POLYBENCH_FREE_ARRAY(x) free((void*)x); | ||
| # define POLYBENCH_DECL_VAR(x) (*x) | ||
| # else | ||
| # define POLYBENCH_ARRAY(x) x | ||
| # define POLYBENCH_FREE_ARRAY(x) | ||
| # define POLYBENCH_DECL_VAR(x) x | ||
| # endif | ||
| /* Macros for using arrays in the function prototypes. */ | ||
| # define POLYBENCH_1D(var, dim1,ddim1) var[POLYBENCH_RESTRICT POLYBENCH_C99_SELECT(dim1,ddim1) + POLYBENCH_PADDING_FACTOR] | ||
| # define POLYBENCH_2D(var, dim1, dim2, ddim1, ddim2) var[POLYBENCH_RESTRICT POLYBENCH_C99_SELECT(dim1,ddim1) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim2,ddim2) + POLYBENCH_PADDING_FACTOR] | ||
| # define POLYBENCH_3D(var, dim1, dim2, dim3, ddim1, ddim2, ddim3) var[POLYBENCH_RESTRICT POLYBENCH_C99_SELECT(dim1,ddim1) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim2,ddim2) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim3,ddim3) + POLYBENCH_PADDING_FACTOR] | ||
| # define POLYBENCH_4D(var, dim1, dim2, dim3, dim4, ddim1, ddim2, ddim3, ddim4) var[POLYBENCH_RESTRICT POLYBENCH_C99_SELECT(dim1,ddim1) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim2,ddim2) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim3,ddim3) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim4,ddim4) + POLYBENCH_PADDING_FACTOR] | ||
| # define POLYBENCH_5D(var, dim1, dim2, dim3, dim4, dim5, ddim1, ddim2, ddim3, ddim4, ddim5) var[POLYBENCH_RESTRICT POLYBENCH_C99_SELECT(dim1,ddim1) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim2,ddim2) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim3,ddim3) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim4,ddim4) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim5,ddim5) + POLYBENCH_PADDING_FACTOR] | ||
| /* Macros for using arrays within the functions. */ | ||
| # define POLYBENCH_1D_F(var, dim1,ddim1) var[POLYBENCH_C99_SELECT(dim1,ddim1) + POLYBENCH_PADDING_FACTOR] | ||
| # define POLYBENCH_2D_F(var, dim1, dim2, ddim1, ddim2) var[POLYBENCH_C99_SELECT(dim1,ddim1) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim2,ddim2) + POLYBENCH_PADDING_FACTOR] | ||
| # define POLYBENCH_3D_F(var, dim1, dim2, dim3, ddim1, ddim2, ddim3) var[POLYBENCH_C99_SELECT(dim1,ddim1) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim2,ddim2) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim3,ddim3) + POLYBENCH_PADDING_FACTOR] | ||
| # define POLYBENCH_4D_F(var, dim1, dim2, dim3, dim4, ddim1, ddim2, ddim3, ddim4) var[POLYBENCH_C99_SELECT(dim1,ddim1) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim2,ddim2) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim3,ddim3) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim4,ddim4) + POLYBENCH_PADDING_FACTOR] | ||
| # define POLYBENCH_5D_F(var, dim1, dim2, dim3, dim4, dim5, ddim1, ddim2, ddim3, ddim4, ddim5) var[POLYBENCH_C99_SELECT(dim1,ddim1) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim2,ddim2) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim3,ddim3) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim4,ddim4) + POLYBENCH_PADDING_FACTOR][POLYBENCH_C99_SELECT(dim5,ddim5) + POLYBENCH_PADDING_FACTOR] | ||
|
|
||
|
|
||
| /* Macros to allocate heap arrays. | ||
| Example: | ||
| polybench_alloc_2d_array(N, M, double) => allocates N x M x sizeof(double) | ||
| and returns a pointer to the 2d array | ||
| */ | ||
| # define POLYBENCH_ALLOC_1D_ARRAY(n1, type) \ | ||
| (type(*)[n1 + POLYBENCH_PADDING_FACTOR])polybench_alloc_data (n1 + POLYBENCH_PADDING_FACTOR, sizeof(type)) | ||
| # define POLYBENCH_ALLOC_2D_ARRAY(n1, n2, type) \ | ||
| (type(*)[n1 + POLYBENCH_PADDING_FACTOR][n2 + POLYBENCH_PADDING_FACTOR])polybench_alloc_data ((n1 + POLYBENCH_PADDING_FACTOR) * (n2 + POLYBENCH_PADDING_FACTOR), sizeof(type)) | ||
| # define POLYBENCH_ALLOC_3D_ARRAY(n1, n2, n3, type) \ | ||
| (type(*)[n1 + POLYBENCH_PADDING_FACTOR][n2 + POLYBENCH_PADDING_FACTOR][n3 + POLYBENCH_PADDING_FACTOR])polybench_alloc_data ((n1 + POLYBENCH_PADDING_FACTOR) * (n2 + POLYBENCH_PADDING_FACTOR) * (n3 + POLYBENCH_PADDING_FACTOR), sizeof(type)) | ||
| # define POLYBENCH_ALLOC_4D_ARRAY(n1, n2, n3, n4, type) \ | ||
| (type(*)[n1 + POLYBENCH_PADDING_FACTOR][n2 + POLYBENCH_PADDING_FACTOR][n3 + POLYBENCH_PADDING_FACTOR][n4 + POLYBENCH_PADDING_FACTOR])polybench_alloc_data ((n1 + POLYBENCH_PADDING_FACTOR) * (n2 + POLYBENCH_PADDING_FACTOR) * (n3 + POLYBENCH_PADDING_FACTOR) * (n4 + POLYBENCH_PADDING_FACTOR), sizeof(type)) | ||
| # define POLYBENCH_ALLOC_5D_ARRAY(n1, n2, n3, n4, n5, type) \ | ||
| (type(*)[n1 + POLYBENCH_PADDING_FACTOR][n2 + POLYBENCH_PADDING_FACTOR][n3 + POLYBENCH_PADDING_FACTOR][n4 + POLYBENCH_PADDING_FACTOR][n5 + POLYBENCH_PADDING_FACTOR])polybench_alloc_data ((n1 + POLYBENCH_PADDING_FACTOR) * (n2 + POLYBENCH_PADDING_FACTOR) * (n3 + POLYBENCH_PADDING_FACTOR) * (n4 + POLYBENCH_PADDING_FACTOR) * (n5 + POLYBENCH_PADDING_FACTOR), sizeof(type)) | ||
|
|
||
| /* Macros for array declaration. */ | ||
| # ifndef POLYBENCH_STACK_ARRAYS | ||
| # define POLYBENCH_1D_ARRAY_DECL(var, type, dim1, ddim1) \ | ||
| type POLYBENCH_1D_F(POLYBENCH_DECL_VAR(var), dim1, ddim1); \ | ||
| var = POLYBENCH_ALLOC_1D_ARRAY(POLYBENCH_C99_SELECT(dim1, ddim1), type); | ||
| # define POLYBENCH_2D_ARRAY_DECL(var, type, dim1, dim2, ddim1, ddim2) \ | ||
| type POLYBENCH_2D_F(POLYBENCH_DECL_VAR(var), dim1, dim2, ddim1, ddim2); \ | ||
| var = POLYBENCH_ALLOC_2D_ARRAY(POLYBENCH_C99_SELECT(dim1, ddim1), POLYBENCH_C99_SELECT(dim2, ddim2), type); | ||
| # define POLYBENCH_3D_ARRAY_DECL(var, type, dim1, dim2, dim3, ddim1, ddim2, ddim3) \ | ||
| type POLYBENCH_3D_F(POLYBENCH_DECL_VAR(var), dim1, dim2, dim3, ddim1, ddim2, ddim3); \ | ||
| var = POLYBENCH_ALLOC_3D_ARRAY(POLYBENCH_C99_SELECT(dim1, ddim1), POLYBENCH_C99_SELECT(dim2, ddim2), POLYBENCH_C99_SELECT(dim3, ddim3), type); | ||
| # define POLYBENCH_4D_ARRAY_DECL(var, type, dim1, dim2, dim3, dim4, ddim1, ddim2, ddim3, ddim4) \ | ||
| type POLYBENCH_4D_F(POLYBENCH_DECL_VAR(var), dim1, dim2, dim3, dim4, ddim1, ddim2, ddim3, ddim4); \ | ||
| var = POLYBENCH_ALLOC_4D_ARRAY(POLYBENCH_C99_SELECT(dim1, ddim1), POLYBENCH_C99_SELECT(dim2, ddim2), POLYBENCH_C99_SELECT(dim3, ddim3), POLYBENCH_C99_SELECT(dim4, ddim4), type); | ||
| # define POLYBENCH_5D_ARRAY_DECL(var, type, dim1, dim2, dim3, dim4, dim5, ddim1, ddim2, ddim3, ddim4, ddim5) \ | ||
| type POLYBENCH_5D_F(POLYBENCH_DECL_VAR(var), dim1, dim2, dim3, dim4, dim5, ddim1, ddim2, ddim3, ddim4, ddim5); \ | ||
| var = POLYBENCH_ALLOC_5D_ARRAY(POLYBENCH_C99_SELECT(dim1, ddim1), POLYBENCH_C99_SELECT(dim2, ddim2), POLYBENCH_C99_SELECT(dim3, ddim3), POLYBENCH_C99_SELECT(dim4, ddim4), POLYBENCH_C99_SELECT(dim5, ddim5), type); | ||
| # else | ||
| # define POLYBENCH_1D_ARRAY_DECL(var, type, dim1, ddim1) \ | ||
| type POLYBENCH_1D_F(POLYBENCH_DECL_VAR(var), dim1, ddim1); | ||
| # define POLYBENCH_2D_ARRAY_DECL(var, type, dim1, dim2, ddim1, ddim2) \ | ||
| type POLYBENCH_2D_F(POLYBENCH_DECL_VAR(var), dim1, dim2, ddim1, ddim2); | ||
| # define POLYBENCH_3D_ARRAY_DECL(var, type, dim1, dim2, dim3, ddim1, ddim2, ddim3) \ | ||
| type POLYBENCH_3D_F(POLYBENCH_DECL_VAR(var), dim1, dim2, dim3, ddim1, ddim2, ddim3); | ||
| # define POLYBENCH_4D_ARRAY_DECL(var, type, dim1, dim2, dim3, dim4, ddim1, ddim2, ddim3, ddim4) \ | ||
| type POLYBENCH_4D_F(POLYBENCH_DECL_VAR(var), dim1, dim2, dim3, dim4, ddim1, ddim2, ddim3, ddim4); | ||
| # define POLYBENCH_5D_ARRAY_DECL(var, type, dim1, dim2, dim3, dim4, dim5, ddim1, ddim2, ddim3, ddim4, ddim5) \ | ||
| type POLYBENCH_5D_F(POLYBENCH_DECL_VAR(var), dim1, dim2, dim3, dim4, dim5, ddim1, ddim2, ddim3, ddim4, ddim5); | ||
| # endif | ||
|
|
||
|
|
||
| /* Dead-code elimination macros. Use argc/argv for the run-time check. */ | ||
| # ifndef POLYBENCH_DUMP_ARRAYS | ||
| # define POLYBENCH_DCE_ONLY_CODE if (argc > 42 && ! strcmp(argv[0], "")) | ||
| # else | ||
| # define POLYBENCH_DCE_ONLY_CODE | ||
| # endif | ||
|
|
||
| #define POLYBENCH_DUMP_TARGET stderr | ||
| #define POLYBENCH_DUMP_START fprintf(POLYBENCH_DUMP_TARGET, "==BEGIN DUMP_ARRAYS==\n") | ||
| #define POLYBENCH_DUMP_FINISH fprintf(POLYBENCH_DUMP_TARGET, "==END DUMP_ARRAYS==\n") | ||
| #define POLYBENCH_DUMP_BEGIN(s) fprintf(POLYBENCH_DUMP_TARGET, "begin dump: %s", s) | ||
| #define POLYBENCH_DUMP_END(s) fprintf(POLYBENCH_DUMP_TARGET, "\nend dump: %s\n", s) | ||
|
|
||
| # define polybench_prevent_dce(func) \ | ||
| POLYBENCH_DCE_ONLY_CODE \ | ||
| func | ||
|
|
||
|
|
||
| /* Performance-related instrumentation. See polybench.c */ | ||
| # define polybench_start_instruments | ||
| # define polybench_stop_instruments | ||
| # define polybench_print_instruments | ||
|
|
||
|
|
||
| /* PAPI support. */ | ||
| # ifdef POLYBENCH_PAPI | ||
| extern const unsigned int polybench_papi_eventlist[]; | ||
| # undef polybench_start_instruments | ||
| # undef polybench_stop_instruments | ||
| # undef polybench_print_instruments | ||
| # define polybench_set_papi_thread_report(x) \ | ||
| polybench_papi_counters_threadid = x; | ||
| # define polybench_start_instruments \ | ||
| polybench_prepare_instruments(); \ | ||
| polybench_papi_init(); \ | ||
| int evid; \ | ||
| for (evid = 0; polybench_papi_eventlist[evid] != 0; evid++) \ | ||
| { \ | ||
| if (polybench_papi_start_counter(evid)) \ | ||
| continue; \ | ||
|
|
||
| # define polybench_stop_instruments \ | ||
| polybench_papi_stop_counter(evid); \ | ||
| } \ | ||
| polybench_papi_close(); \ | ||
|
|
||
| # define polybench_print_instruments polybench_papi_print(); | ||
| # endif | ||
|
|
||
|
|
||
| /* Timing support. */ | ||
| # if defined(POLYBENCH_TIME) || defined(POLYBENCH_GFLOPS) | ||
| # undef polybench_start_instruments | ||
| # undef polybench_stop_instruments | ||
| # undef polybench_print_instruments | ||
| # define polybench_start_instruments polybench_timer_start(); | ||
| # define polybench_stop_instruments polybench_timer_stop(); | ||
| # define polybench_print_instruments polybench_timer_print(); | ||
| extern double polybench_program_total_flops; | ||
| extern void polybench_timer_start(); | ||
| extern void polybench_timer_stop(); | ||
| extern void polybench_timer_print(); | ||
| # endif | ||
|
|
||
| /* Function declaration. */ | ||
| # ifdef POLYBENCH_TIME | ||
| extern void polybench_timer_start(); | ||
| extern void polybench_timer_stop(); | ||
| extern void polybench_timer_print(); | ||
| # endif | ||
|
|
||
| # ifdef POLYBENCH_PAPI | ||
| extern void polybench_prepare_instruments(); | ||
| extern int polybench_papi_start_counter(int evid); | ||
| extern void polybench_papi_stop_counter(int evid); | ||
| extern void polybench_papi_init(); | ||
| extern void polybench_papi_close(); | ||
| extern void polybench_papi_print(); | ||
| # endif | ||
|
|
||
| /* Function prototypes. */ | ||
| extern void* polybench_alloc_data(unsigned long long int n, int elt_size); | ||
|
|
||
|
|
||
| #endif /* !POLYBENCH_H */ |
Oops, something went wrong.
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.