Skip to content

Commit a600e3a

Browse files
authored
Merge branch 'intel:sycl' into cb_events2
2 parents e8c3507 + a98a72d commit a600e3a

File tree

126 files changed

+2116
-464
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+2116
-464
lines changed

devops/scripts/benchmarks/benches/compute.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,14 @@ def benchmarks(self) -> list[Benchmark]:
310310
class ComputeBenchmark(Benchmark):
311311
def __init__(
312312
self,
313-
bench,
314-
name,
315-
test,
313+
suite: ComputeBench,
314+
name: str,
315+
test: str,
316316
runtime: RUNTIMES = None,
317317
profiler_type: PROFILERS = PROFILERS.TIMER,
318318
):
319-
super().__init__(bench)
320-
self.bench = bench
319+
super().__init__(suite)
320+
self.suite = suite
321321
self.bench_name = name
322322
self.test = test
323323
self.runtime = runtime
@@ -333,7 +333,7 @@ def __init__(
333333
@property
334334
def benchmark_bin(self) -> Path:
335335
"""Returns the path to the benchmark binary"""
336-
return self.bench.project.build_dir / "bin" / self.bench_name
336+
return self.suite.project.build_dir / "bin" / self.bench_name
337337

338338
def cpu_count_str(self, separator: str = "") -> str:
339339
# Note: SYCL CI currently relies on this "CPU count" value.
@@ -439,8 +439,8 @@ def run(
439439
command=command,
440440
env=env_vars,
441441
unit=unit,
442-
git_url=self.bench.git_url(),
443-
git_hash=self.bench.git_hash(),
442+
git_url=self.suite.git_url(),
443+
git_hash=self.suite.git_hash(),
444444
)
445445
)
446446
return ret

devops/scripts/benchmarks/benches/llamacpp.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ def benchmarks(self) -> list[Benchmark]:
7676

7777

7878
class LlamaBench(Benchmark):
79-
def __init__(self, bench):
80-
super().__init__(bench)
81-
self.bench = bench
79+
def __init__(self, suite: LlamaCppBench):
80+
super().__init__(suite)
81+
self.suite = suite
8282

8383
@property
8484
def benchmark_bin(self) -> Path:
85-
return self.bench.project.build_dir / "bin" / "llama-bench"
85+
return self.suite.project.build_dir / "bin" / "llama-bench"
8686

8787
def enabled(self):
8888
if options.sycl is None:
@@ -138,13 +138,13 @@ def run(
138138
"--mmap",
139139
"0",
140140
"--model",
141-
f"{self.bench.model}",
141+
f"{self.suite.model}",
142142
]
143143

144144
result = self.run_bench(
145145
command,
146146
env_vars,
147-
ld_library=self.bench.oneapi.ld_libraries(),
147+
ld_library=self.suite.oneapi.ld_libraries(),
148148
run_trace=run_trace,
149149
force_trace=force_trace,
150150
)
@@ -160,8 +160,8 @@ def run(
160160
command=command,
161161
env=env_vars,
162162
unit="token/s",
163-
git_url=self.bench.git_url(),
164-
git_hash=self.bench.git_hash(),
163+
git_url=self.suite.git_url(),
164+
git_hash=self.suite.git_hash(),
165165
)
166166
)
167167
return results

devops/scripts/benchmarks/benches/syclbench.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ def benchmarks(self) -> list[Benchmark]:
102102

103103

104104
class SyclBenchmark(Benchmark):
105-
def __init__(self, bench, name, test):
106-
super().__init__(bench)
107-
self.bench = bench
105+
def __init__(self, suite: SyclBench, name: str, test: str):
106+
super().__init__(suite)
107+
self.suite = suite
108108
self.bench_name = name
109109
self.test = test
110110

111111
@property
112112
def benchmark_bin(self) -> Path:
113-
return self.bench.project.build_dir / self.bench_name
113+
return self.suite.project.build_dir / self.bench_name
114114

115115
def enabled(self) -> bool:
116116
return options.sycl is not None
@@ -169,8 +169,8 @@ def run(
169169
command=command,
170170
env=env_vars,
171171
unit="ms",
172-
git_url=self.bench.git_url(),
173-
git_hash=self.bench.git_hash(),
172+
git_url=self.suite.git_url(),
173+
git_hash=self.suite.git_hash(),
174174
)
175175
)
176176

@@ -179,7 +179,7 @@ def run(
179179
return res_list
180180

181181
def name(self):
182-
return f"{self.bench.name()} {self.test}"
182+
return f"{self.suite.name()} {self.test}"
183183

184184
def teardown(self):
185185
return

devops/scripts/benchmarks/benches/umf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ def benchmarks(self) -> list[Benchmark]:
4040

4141

4242
class GBench(Benchmark):
43-
def __init__(self, bench):
44-
super().__init__(bench)
43+
def __init__(self, suite: UMFSuite):
44+
super().__init__(suite)
4545

46-
self.bench = bench
4746
self.bench_name = "umf-benchmark"
4847

4948
self.fragmentation_prefix = "FRAGMENTATION_"

devops/scripts/benchmarks/benches/velocity.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,20 @@ def benchmarks(self) -> list[Benchmark]:
5757

5858

5959
class VelocityBase(Benchmark):
60-
def __init__(self, name: str, bin_name: str, vb: VelocityBench, unit: str):
61-
super().__init__(vb)
62-
self.vb = vb
60+
def __init__(self, suite: VelocityBench, name: str, bin_name: str, unit: str):
61+
super().__init__(suite)
62+
self.suite = suite
6363
self.bench_name = name
6464
self.bin_name = bin_name
6565
self.unit = unit
6666

6767
@property
6868
def src_dir(self) -> Path:
69-
return self.vb.project.src_dir / self.bench_name / "SYCL"
69+
return self.suite.project.src_dir / self.bench_name / "SYCL"
7070

7171
@property
7272
def build_dir(self) -> Path:
73-
return self.vb.project.build_dir / self.bench_name
73+
return self.suite.project.build_dir / self.bench_name
7474

7575
@property
7676
def benchmark_bin(self) -> Path:
@@ -177,8 +177,8 @@ def run(
177177
command=command,
178178
env=env_vars,
179179
unit=self.unit,
180-
git_url=self.vb.git_url(),
181-
git_hash=self.vb.git_hash(),
180+
git_url=self.suite.git_url(),
181+
git_hash=self.suite.git_hash(),
182182
)
183183
]
184184

@@ -187,8 +187,8 @@ def teardown(self):
187187

188188

189189
class Hashtable(VelocityBase):
190-
def __init__(self, vb: VelocityBench):
191-
super().__init__("hashtable", "hashtable_sycl", vb, "M keys/sec")
190+
def __init__(self, suite: VelocityBench):
191+
super().__init__(suite, "hashtable", "hashtable_sycl", "M keys/sec")
192192

193193
def name(self):
194194
return "Velocity-Bench Hashtable"
@@ -219,8 +219,8 @@ def get_tags(self):
219219

220220

221221
class Bitcracker(VelocityBase):
222-
def __init__(self, vb: VelocityBench):
223-
super().__init__("bitcracker", "bitcracker", vb, "s")
222+
def __init__(self, suite: VelocityBench):
223+
super().__init__(suite, "bitcracker", "bitcracker", "s")
224224

225225
def name(self):
226226
return "Velocity-Bench Bitcracker"
@@ -234,7 +234,7 @@ def description(self) -> str:
234234

235235
def bin_args(self) -> list[str]:
236236
self.data_path = os.path.join(
237-
self.vb.project.src_dir, "bitcracker", "hash_pass"
237+
self.suite.project.src_dir, "bitcracker", "hash_pass"
238238
)
239239

240240
return [
@@ -262,8 +262,8 @@ def get_tags(self):
262262

263263

264264
class SobelFilter(VelocityBase):
265-
def __init__(self, vb: VelocityBench):
266-
super().__init__("sobel_filter", "sobel_filter", vb, "ms")
265+
def __init__(self, suite: VelocityBench):
266+
super().__init__(suite, "sobel_filter", "sobel_filter", "ms")
267267

268268
def download_deps(self):
269269
self.download(
@@ -311,8 +311,8 @@ def get_tags(self):
311311

312312

313313
class QuickSilver(VelocityBase):
314-
def __init__(self, vb: VelocityBench):
315-
super().__init__("QuickSilver", "qs", vb, "MMS/CTT")
314+
def __init__(self, suite: VelocityBench):
315+
super().__init__(suite, "QuickSilver", "qs", "MMS/CTT")
316316

317317
def run(
318318
self,
@@ -344,7 +344,7 @@ def lower_is_better(self):
344344

345345
def bin_args(self) -> list[str]:
346346
self.data_path = os.path.join(
347-
self.vb.project.src_dir, "QuickSilver", "Examples", "AllScattering"
347+
self.suite.project.src_dir, "QuickSilver", "Examples", "AllScattering"
348348
)
349349

350350
return ["-i", f"{self.data_path}/scatteringOnly.inp"]
@@ -366,8 +366,8 @@ def get_tags(self):
366366

367367

368368
class Easywave(VelocityBase):
369-
def __init__(self, vb: VelocityBench):
370-
super().__init__("easywave", "easyWave_sycl", vb, "ms")
369+
def __init__(self, suite: VelocityBench):
370+
super().__init__(suite, "easywave", "easyWave_sycl", "ms")
371371

372372
def download_deps(self):
373373
self.download(
@@ -433,11 +433,11 @@ def get_tags(self):
433433

434434

435435
class CudaSift(VelocityBase):
436-
def __init__(self, vb: VelocityBench):
437-
super().__init__("cudaSift", "cudaSift", vb, "ms")
436+
def __init__(self, suite: VelocityBench):
437+
super().__init__(suite, "cudaSift", "cudaSift", "ms")
438438

439439
def download_deps(self):
440-
images = os.path.join(self.vb.project.src_dir, self.bench_name, "inputData")
440+
images = os.path.join(self.suite.project.src_dir, self.bench_name, "inputData")
441441
dest = os.path.join(options.workdir, "inputData")
442442
if not os.path.exists(dest):
443443
shutil.copytree(images, dest)
@@ -464,8 +464,8 @@ def get_tags(self):
464464

465465

466466
class DLCifar(VelocityBase):
467-
def __init__(self, vb: VelocityBench):
468-
super().__init__("dl-cifar", "dl-cifar_sycl", vb, "s")
467+
def __init__(self, suite: VelocityBench):
468+
super().__init__(suite, "dl-cifar", "dl-cifar_sycl", "s")
469469

470470
def ld_libraries(self):
471471
return get_oneapi().ld_libraries()
@@ -518,8 +518,8 @@ def get_tags(self):
518518

519519

520520
class DLMnist(VelocityBase):
521-
def __init__(self, vb: VelocityBench):
522-
super().__init__("dl-mnist", "dl-mnist-sycl", vb, "s")
521+
def __init__(self, suite: VelocityBench):
522+
super().__init__(suite, "dl-mnist", "dl-mnist-sycl", "s")
523523

524524
def ld_libraries(self):
525525
return get_oneapi().ld_libraries()
@@ -606,8 +606,8 @@ def get_tags(self):
606606

607607

608608
class SVM(VelocityBase):
609-
def __init__(self, vb: VelocityBench):
610-
super().__init__("svm", "svm_sycl", vb, "s")
609+
def __init__(self, suite: VelocityBench):
610+
super().__init__(suite, "svm", "svm_sycl", "s")
611611

612612
def ld_libraries(self):
613613
return get_oneapi().ld_libraries()

devops/scripts/benchmarks/html/scripts.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,14 +1790,15 @@ function fetchAndProcessData(url, isArchived = false) {
17901790
window.benchmarkMetadata = data.benchmarkMetadata || data.metadata || {};
17911791
window.benchmarkTags = data.benchmarkTags || data.tags || {};
17921792
window.flamegraphData = (data.flamegraphData && data.flamegraphData.runs) ? data.flamegraphData : { runs: {} };
1793-
if (Array.isArray(data.defaultCompareNames)) {
1793+
if (Array.isArray(data.defaultCompareNames) && (!defaultCompareNames || defaultCompareNames.length === 0)) {
17941794
defaultCompareNames = data.defaultCompareNames;
17951795
}
17961796
console.log('Remote data loaded (normalized):', {
17971797
runs: runsArray.length,
17981798
metadata: Object.keys(window.benchmarkMetadata).length,
17991799
tags: Object.keys(window.benchmarkTags).length,
1800-
flamegraphs: Object.keys(window.flamegraphData.runs).length
1800+
flamegraphs: Object.keys(window.flamegraphData.runs).length,
1801+
defaultCompareNames: defaultCompareNames
18011802
});
18021803
}
18031804

libc/include/endian.h.def

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//===-- POSIX header endian.h ---------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_ENDIAN_H
10+
#define LLVM_LIBC_ENDIAN_H
11+
12+
#include "__llvm-libc-common.h"
13+
#include "llvm-libc-macros/endian-macros.h"
14+
15+
%%public_api()
16+
17+
#endif // LLVM_LIBC_ENDIAN_H
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//===-- Macros defined in poll.h header file ------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_MACROS_POLL_MACROS_H
10+
#define LLVM_LIBC_MACROS_POLL_MACROS_H
11+
12+
#ifdef __linux__
13+
#include "linux/poll-macros.h"
14+
#endif
15+
16+
#endif // LLVM_LIBC_MACROS_POLL_MACROS_H

libc/include/poll.h.def

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//===-- C standard library header poll.h ----------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_POLL_H
10+
#define LLVM_LIBC_POLL_H
11+
12+
#include "__llvm-libc-common.h"
13+
#include "llvm-libc-macros/poll-macros.h"
14+
15+
%%public_api()
16+
17+
#endif // LLVM_LIBC_POLL_H
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//===-- Unittests for countlsk --------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#include "CountlsTest.h"
10+
11+
#include "src/stdfix/countlsk.h"
12+
13+
LIST_COUNTLS_TESTS(accum, LIBC_NAMESPACE::countlsk);

0 commit comments

Comments
 (0)