Skip to content

Commit 54d94f1

Browse files
Merge branch 'sycl' into Alexandr-Konovalov/UR-counters-shared_ptr
2 parents 7715cc6 + 732a9ce commit 54d94f1

File tree

121 files changed

+1506
-1340
lines changed

Some content is hidden

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

121 files changed

+1506
-1340
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ sycl/doc/syclgraph/ @intel/sycl-graphs-reviewers
177177
sycl/**/syclcompat/ @intel/syclcompat-lib-reviewers
178178
sycl/cmake/modules/AddSYCLLibraryUnitTest.cmake @intel/syclcompat-lib-reviewers
179179
sycl/include/syclcompat.hpp @intel/syclcompat-lib-reviewers
180+
sycl/test-e2e/syclcompat/ @intel/syclcompat-lib-reviewers
180181

181182
# bindless images
182183
sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @intel/bindless-images-reviewers

.github/workflows/sycl-containers-igc-dev.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ on:
77
paths:
88
- 'devops/actions/build_container/**'
99
- 'devops/scripts/**'
10+
- '!devops/scripts/benchmarks/**'
1011
- 'devops/dependencies-igc-dev.json'
1112
- '.github/workflows/sycl-containers-igc-dev.yaml'
1213
pull_request:
1314
paths:
1415
- 'devops/actions/build_container/**'
1516
- 'devops/scripts/**'
17+
- '!devops/scripts/benchmarks/**'
1618
- 'devops/dependencies-igc-dev.json'
1719
- '.github/workflows/sycl-containers-igc-dev.yaml'
1820

.github/workflows/sycl-linux-build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ on:
3232
build_artifact_suffix:
3333
type: string
3434
required: true
35+
build_target:
36+
type: string
37+
required: false
38+
default: sycl-toolchain
3539
artifact_archive_name:
3640
type: string
3741
default: llvm_sycl.tar.zst
@@ -177,7 +181,8 @@ jobs:
177181
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV
178182
- name: Compile
179183
id: build
180-
run: cmake --build $GITHUB_WORKSPACE/build --target sycl-toolchain
184+
# Emulate default value for manual dispatch as we've run out of available arguments.
185+
run: cmake --build $GITHUB_WORKSPACE/build --target ${{ inputs.build_target || 'sycl-toolchain' }}
181186
- name: check-llvm
182187
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
183188
run: |

.github/workflows/sycl-nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
build_cache_suffix: sprod_shared
3434
build_artifact_suffix: sprod_shared
3535
build_configure_extra_args: '--shared-libs --hip --cuda --native_cpu --no-assertions'
36+
build_target: all
3637

3738
artifact_archive_name: sycl_linux_shared.tar.zst
3839

@@ -151,6 +152,7 @@ jobs:
151152
artifact_archive_name: sycl_windows.tar.gz
152153
# Disable the spirv-dis requirement as to not require SPIR-V Tools.
153154
build_configure_extra_args: -DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=off
155+
build_target: all
154156

155157
e2e-win:
156158
needs: build-win

.github/workflows/sycl-windows-build.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
build_configure_extra_args:
1111
type: string
1212
required: false
13+
build_target:
14+
type: string
15+
required: false
16+
default: sycl-toolchain
1317
changes:
1418
type: string
1519
description: 'Filter matches for the changed files in the PR'
@@ -58,6 +62,11 @@ on:
5862
build_configure_extra_args:
5963
type: string
6064
required: false
65+
build_target:
66+
type: choice
67+
options:
68+
- "sycl-toolchain"
69+
- "all"
6170
artifact_archive_name:
6271
type: choice
6372
options:
@@ -143,7 +152,7 @@ jobs:
143152
id: build
144153
shell: bash
145154
run: |
146-
cmake --build build --target sycl-toolchain
155+
cmake --build build --target ${{ inputs.build_target }}
147156
- name: check-llvm
148157
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
149158
shell: bash

.github/workflows/ur-build-hw.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ jobs:
164164
- name: Test adapter specific
165165
env:
166166
ZE_ENABLE_LOADER_DEBUG_TRACE: 1
167-
run: ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV
167+
LIT_OPTS: "--timeout 120 --filter-out 'adapters/level_zero/memcheck.test'"
168+
run: cmake --build build -j $(nproc) -- check-unified-runtime-adapter
168169
# Don't run adapter specific tests when building multiple adapters
169170
if: ${{ matrix.adapter.other_name == '' }}
170171

devops/scripts/benchmarks/benches/compute.py

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,17 @@ def benchmarks(self) -> list[Benchmark]:
149149
for in_order_queue in [0, 1]:
150150
for measure_completion in [0, 1]:
151151
for use_events in [0, 1]:
152-
benches.append(
153-
SubmitKernel(
154-
self,
155-
runtime,
156-
in_order_queue,
157-
measure_completion,
158-
use_events,
152+
for kernel_exec_time in [1, 20]:
153+
benches.append(
154+
SubmitKernel(
155+
self,
156+
runtime,
157+
in_order_queue,
158+
measure_completion,
159+
use_events,
160+
kernel_exec_time,
161+
)
159162
)
160-
)
161163

162164
# Add SinKernelGraph benchmarks
163165
for runtime in self.enabled_runtimes():
@@ -332,11 +334,20 @@ def teardown(self):
332334

333335

334336
class SubmitKernel(ComputeBenchmark):
335-
def __init__(self, bench, runtime: RUNTIMES, ioq, MeasureCompletion=0, UseEvents=0):
337+
def __init__(
338+
self,
339+
bench,
340+
runtime: RUNTIMES,
341+
ioq,
342+
MeasureCompletion=0,
343+
UseEvents=0,
344+
KernelExecTime=1,
345+
):
336346
self.ioq = ioq
337347
self.runtime = runtime
338348
self.MeasureCompletion = MeasureCompletion
339349
self.UseEvents = UseEvents
350+
self.KernelExecTime = KernelExecTime
340351
self.NumKernels = 10
341352
super().__init__(
342353
bench, f"api_overhead_benchmark_{runtime.value}", "SubmitKernel"
@@ -353,7 +364,11 @@ def name(self):
353364
# to match the existing already stored results
354365
events_str = " not using events" if not self.UseEvents else ""
355366

356-
return f"api_overhead_benchmark_{self.runtime.value} SubmitKernel {order}{completion_str}{events_str}"
367+
kernel_exec_time_str = (
368+
f" KernelExecTime={self.KernelExecTime}" if self.KernelExecTime != 1 else ""
369+
)
370+
371+
return f"api_overhead_benchmark_{self.runtime.value} SubmitKernel {order}{completion_str}{events_str}{kernel_exec_time_str}"
357372

358373
def display_name(self) -> str:
359374
order = "in order" if self.ioq else "out of order"
@@ -362,6 +377,8 @@ def display_name(self) -> str:
362377
info.append("with measure completion")
363378
if self.UseEvents:
364379
info.append("using events")
380+
if self.KernelExecTime != 1:
381+
info.append(f"KernelExecTime={self.KernelExecTime}")
365382
additional_info = f" {' '.join(info)}" if info else ""
366383
return f"{self.runtime.value.upper()} SubmitKernel {order}{additional_info}, NumKernels {self.NumKernels}"
367384

@@ -373,7 +390,11 @@ def explicit_group(self):
373390
# to match the existing already stored results
374391
events_str = " not using events" if not self.UseEvents else ""
375392

376-
return f"SubmitKernel {order}{completion_str}{events_str}"
393+
kernel_exec_time_str = (
394+
f" KernelExecTime={self.KernelExecTime}" if self.KernelExecTime != 1 else ""
395+
)
396+
397+
return f"SubmitKernel {order}{completion_str}{events_str}{kernel_exec_time_str}"
377398

378399
def description(self) -> str:
379400
order = "in-order" if self.ioq else "out-of-order"
@@ -386,6 +407,7 @@ def description(self) -> str:
386407
return (
387408
f"Measures CPU time overhead of submitting {order} kernels through {runtime_name} API{completion_desc}. "
388409
f"Runs {self.NumKernels} simple kernels with minimal execution time to isolate API overhead from kernel execution time."
410+
f"Each kernel executes for approximately {self.KernelExecTime} micro seconds."
389411
)
390412

391413
def range(self) -> tuple[float, float]:
@@ -398,7 +420,7 @@ def bin_args(self) -> list[str]:
398420
"--iterations=100000",
399421
"--Profiling=0",
400422
f"--NumKernels={self.NumKernels}",
401-
"--KernelExecTime=1",
423+
f"--KernelExecTime={self.KernelExecTime}",
402424
f"--UseEvents={self.UseEvents}",
403425
]
404426

libclc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
586586
ARCH_SUFFIX libspirv-${arch_suffix}
587587
TRIPLE ${clang_triple}
588588
TARGET_ENV libspirv-
589+
REMANGLE ${LIBCLC_GENERATE_REMANGLED_VARIANTS}
589590
COMPILE_FLAGS ${spirv_build_flags}
590591
OPT_FLAGS ${opt_flags}
591592
LIB_FILES ${libspirv_lib_files}

libclc/cmake/modules/AddLibclc.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ endfunction()
309309
# Optimization options (for opt)
310310
# * TARGET_ENV <string>
311311
# Prefix to give the final builtin library aliases
312+
# * REMANGLE <string>
313+
# Bool string indicating whether remangler will be run
312314
# * ALIASES <string> ...
313315
# List of aliases
314316
# * INTERNAL_LINK_DEPENDENCIES <target> ...
@@ -318,7 +320,7 @@ endfunction()
318320
function(add_libclc_builtin_set)
319321
cmake_parse_arguments(ARG
320322
"CLC_INTERNAL"
321-
"ARCH;TRIPLE;ARCH_SUFFIX;TARGET_ENV;PARENT_TARGET"
323+
"ARCH;TRIPLE;ARCH_SUFFIX;TARGET_ENV;REMANGLE;PARENT_TARGET"
322324
"LIB_FILES;GEN_FILES;COMPILE_FLAGS;OPT_FLAGS;ALIASES;INTERNAL_LINK_DEPENDENCIES"
323325
${ARGN}
324326
)
@@ -483,7 +485,7 @@ function(add_libclc_builtin_set)
483485
install( FILES ${builtins_lib} DESTINATION ${CMAKE_INSTALL_DATADIR}/clc )
484486

485487
# Generate remangled variants if requested
486-
if( LIBCLC_GENERATE_REMANGLED_VARIANTS )
488+
if( ARG_REMANGLE )
487489
set( dummy_in ${LIBCLC_LIBRARY_OUTPUT_INTDIR}/libclc_dummy_in.cc )
488490
add_custom_command( OUTPUT ${dummy_in}
489491
COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBCLC_LIBRARY_OUTPUT_INTDIR}

0 commit comments

Comments
 (0)