10{
13 FILE* ofp_papi;
14 const char *sufx = ".vec";
15 char *papiFileName;
16
17 (void)hw_desc;
18
19 int l = strlen(outdir)+strlen(papi_event_name)+strlen(sufx);
20 if (NULL == (papiFileName = (char *)calloc( 1+l, sizeof(char)))) {
21 return;
22 }
23 if (l != (sprintf(papiFileName, "%s%s%s", outdir, papi_event_name, sufx))) {
24 goto error0;
25 }
26 if (NULL == (ofp_papi = fopen(papiFileName,"w"))) {
27 fprintf(
stderr,
"Failed to open file %s.\n", papiFileName);
28 goto error0;
29 }
30
33 goto error1;
34 }
35
38 goto error1;
39 }
40
41#if defined(X86)
42
43#if defined(AVX128_AVAIL)
44
45
46 test_hp_x86_128B_VEC( 24, 1000,
EventSet, ofp_papi );
47 test_hp_x86_128B_VEC( 48, 1000,
EventSet, ofp_papi );
48 test_hp_x86_128B_VEC( 96, 1000,
EventSet, ofp_papi );
49
50#if defined(AVX256_AVAIL)
51 test_hp_x86_256B_VEC( 24, 1000,
EventSet, ofp_papi );
52 test_hp_x86_256B_VEC( 48, 1000,
EventSet, ofp_papi );
53 test_hp_x86_256B_VEC( 96, 1000,
EventSet, ofp_papi );
54
55#if defined(AVX512_AVAIL)
56 test_hp_x86_512B_VEC( 24, 1000,
EventSet, ofp_papi );
57 test_hp_x86_512B_VEC( 48, 1000,
EventSet, ofp_papi );
58 test_hp_x86_512B_VEC( 96, 1000,
EventSet, ofp_papi );
59#endif
60#endif
61
62 test_sp_x86_128B_VEC( 24, 1000,
EventSet, ofp_papi );
63 test_sp_x86_128B_VEC( 48, 1000,
EventSet, ofp_papi );
64 test_sp_x86_128B_VEC( 96, 1000,
EventSet, ofp_papi );
65
66#if defined(AVX256_AVAIL)
67 test_sp_x86_256B_VEC( 24, 1000,
EventSet, ofp_papi );
68 test_sp_x86_256B_VEC( 48, 1000,
EventSet, ofp_papi );
69 test_sp_x86_256B_VEC( 96, 1000,
EventSet, ofp_papi );
70
71#if defined(AVX512_AVAIL)
72 test_sp_x86_512B_VEC( 24, 1000,
EventSet, ofp_papi );
73 test_sp_x86_512B_VEC( 48, 1000,
EventSet, ofp_papi );
74 test_sp_x86_512B_VEC( 96, 1000,
EventSet, ofp_papi );
75#endif
76#endif
77
78 test_dp_x86_128B_VEC( 24, 1000,
EventSet, ofp_papi );
79 test_dp_x86_128B_VEC( 48, 1000,
EventSet, ofp_papi );
80 test_dp_x86_128B_VEC( 96, 1000,
EventSet, ofp_papi );
81
82#if defined(AVX256_AVAIL)
83 test_dp_x86_256B_VEC( 24, 1000,
EventSet, ofp_papi );
84 test_dp_x86_256B_VEC( 48, 1000,
EventSet, ofp_papi );
85 test_dp_x86_256B_VEC( 96, 1000,
EventSet, ofp_papi );
86
87#if defined(AVX512_AVAIL)
88 test_dp_x86_512B_VEC( 24, 1000,
EventSet, ofp_papi );
89 test_dp_x86_512B_VEC( 48, 1000,
EventSet, ofp_papi );
90 test_dp_x86_512B_VEC( 96, 1000,
EventSet, ofp_papi );
91#endif
92#endif
93
94
95 test_hp_x86_128B_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
96 test_hp_x86_128B_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
97 test_hp_x86_128B_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
98
99#if defined(AVX256_AVAIL)
100 test_hp_x86_256B_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
101 test_hp_x86_256B_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
102 test_hp_x86_256B_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
103
104#if defined(AVX512_AVAIL)
105 test_hp_x86_512B_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
106 test_hp_x86_512B_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
107 test_hp_x86_512B_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
108#endif
109#endif
110
111 test_sp_x86_128B_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
112 test_sp_x86_128B_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
113 test_sp_x86_128B_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
114
115#if defined(AVX256_AVAIL)
116 test_sp_x86_256B_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
117 test_sp_x86_256B_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
118 test_sp_x86_256B_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
119
120#if defined(AVX512_AVAIL)
121 test_sp_x86_512B_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
122 test_sp_x86_512B_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
123 test_sp_x86_512B_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
124#endif
125#endif
126
127 test_dp_x86_128B_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
128 test_dp_x86_128B_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
129 test_dp_x86_128B_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
130
131#if defined(AVX256_AVAIL)
132 test_dp_x86_256B_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
133 test_dp_x86_256B_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
134 test_dp_x86_256B_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
135
136#if defined(AVX512_AVAIL)
137 test_dp_x86_512B_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
138 test_dp_x86_512B_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
139 test_dp_x86_512B_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
140#endif
141#endif
142
143#else
144 fprintf(
stderr,
"Vector FLOP benchmark is not supported on this architecture: AVX unavailable!\n");
145#endif
146
147#elif defined(ARM)
148
149
150 test_hp_arm_VEC( 24, 1000,
EventSet, ofp_papi );
151 test_hp_arm_VEC( 48, 1000,
EventSet, ofp_papi );
152 test_hp_arm_VEC( 96, 1000,
EventSet, ofp_papi );
153
154 test_sp_arm_VEC( 24, 1000,
EventSet, ofp_papi );
155 test_sp_arm_VEC( 48, 1000,
EventSet, ofp_papi );
156 test_sp_arm_VEC( 96, 1000,
EventSet, ofp_papi );
157
158 test_dp_arm_VEC( 24, 1000,
EventSet, ofp_papi );
159 test_dp_arm_VEC( 48, 1000,
EventSet, ofp_papi );
160 test_dp_arm_VEC( 96, 1000,
EventSet, ofp_papi );
161
162
163 test_hp_arm_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
164 test_hp_arm_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
165 test_hp_arm_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
166
167 test_sp_arm_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
168 test_sp_arm_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
169 test_sp_arm_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
170
171 test_dp_arm_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
172 test_dp_arm_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
173 test_dp_arm_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
174
175#elif defined(POWER)
176
177
178 test_hp_power_VEC( 24, 1000,
EventSet, ofp_papi );
179 test_hp_power_VEC( 48, 1000,
EventSet, ofp_papi );
180 test_hp_power_VEC( 96, 1000,
EventSet, ofp_papi );
181
182 test_sp_power_VEC( 24, 1000,
EventSet, ofp_papi );
183 test_sp_power_VEC( 48, 1000,
EventSet, ofp_papi );
184 test_sp_power_VEC( 96, 1000,
EventSet, ofp_papi );
185
186 test_dp_power_VEC( 24, 1000,
EventSet, ofp_papi );
187 test_dp_power_VEC( 48, 1000,
EventSet, ofp_papi );
188 test_dp_power_VEC( 96, 1000,
EventSet, ofp_papi );
189
190
191 test_hp_power_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
192 test_hp_power_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
193 test_hp_power_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
194
195 test_sp_power_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
196 test_sp_power_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
197 test_sp_power_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
198
199 test_dp_power_VEC_FMA( 12, 1000,
EventSet, ofp_papi );
200 test_dp_power_VEC_FMA( 24, 1000,
EventSet, ofp_papi );
201 test_dp_power_VEC_FMA( 48, 1000,
EventSet, ofp_papi );
202
203#endif
204
207 goto error1;
208 }
211 goto error1;
212 }
213
214error1:
216error0:
217 free(papiFileName);
218 return;
219}
add PAPI preset or native hardware event by name to an EventSet
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
int fclose(FILE *__stream)