Skip to content

Commit 0198f0e

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into sycl_bundle_multi_device_core_version
2 parents cce501a + 19516d0 commit 0198f0e

File tree

14 files changed

+114
-55
lines changed

14 files changed

+114
-55
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,22 @@ jobs:
8383
- name: Intel
8484
runner: '["Linux", "gen12"]'
8585
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
86-
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
86+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
8787
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
8888
reset_intel_gpu: true
8989
extra_lit_opts: --param gpu-intel-gen12=True
9090
- name: E2E tests on Intel Arc A-Series Graphics
9191
runner: '["Linux", "arc"]'
9292
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
93-
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
93+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
9494
target_devices: level_zero:gpu;opencl:gpu
9595
reset_intel_gpu: true
9696
extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True
9797
env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }'
9898
- name: E2E tests with dev igc on Intel Arc A-Series Graphics
9999
runner: '["Linux", "arc"]'
100100
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:devigc
101-
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
101+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
102102
target_devices: level_zero:gpu;opencl:gpu
103103
reset_intel_gpu: true
104104
extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True

.github/workflows/sycl-nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Intel L0 GPU
5454
runner: '["Linux", "gen12"]'
5555
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
56-
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
56+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
5757
target_devices: level_zero:gpu
5858
reset_intel_gpu: true
5959
tests_selector: e2e
@@ -62,7 +62,7 @@ jobs:
6262
- name: Intel OCL GPU
6363
runner: '["Linux", "gen12"]'
6464
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
65-
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
65+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
6666
target_devices: opencl:gpu
6767
reset_intel_gpu: true
6868
tests_selector: e2e

.github/workflows/sycl-post-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
name: ${{ matrix.name }}
8888
runner: ${{ matrix. runner }}
8989
image: ${{ matrix.image || 'ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest' }}
90-
image_options: ${{ matrix.image_options || '-u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN' }}
90+
image_options: ${{ matrix.image_options || '-u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN' }}
9191
target_devices: ${{ matrix.target_devices || 'level_zero:gpu' }}
9292
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
9393

sycl/cmake/modules/FetchUnifiedRuntime.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ if(SYCL_UR_USE_FETCH_CONTENT)
117117
endfunction()
118118

119119
set(UNIFIED_RUNTIME_REPO "https://github.com/againull/unified-runtime")
120-
set(UNIFIED_RUNTIME_TAG 88f2f3b89d0e0e92c552432b2f8ef4a271c7ab32)
120+
set(UNIFIED_RUNTIME_TAG 550df8a622a3bae8113d8e8d9c6deafba0464a87)
121121

122122
set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
123123
# Due to the use of dependentloadflag and no installer for UMF and hwloc we need

sycl/include/sycl/ext/oneapi/experimental/virtual_functions.hpp

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ template <typename Set>
1919
inline constexpr indirectly_callable_key::value_t<Set> indirectly_callable_in;
2020

2121
struct calls_indirectly_key {
22-
template <typename First = void, typename... SetIds>
22+
template <typename... SetIds>
2323
using value_t =
2424
sycl::ext::oneapi::experimental::property_value<calls_indirectly_key,
25-
First, SetIds...>;
25+
SetIds...>;
2626
};
2727

2828
inline constexpr calls_indirectly_key::value_t<void> assume_indirect_calls;
2929

30-
template <typename First, typename... Rest>
31-
inline constexpr calls_indirectly_key::value_t<First, Rest...>
30+
template <typename... SetIds>
31+
inline constexpr calls_indirectly_key::value_t<SetIds...>
3232
assume_indirect_calls_to;
3333

3434
template <> struct is_property_key<indirectly_callable_key> : std::true_type {};
@@ -60,16 +60,57 @@ struct PropertyMetaInfo<indirectly_callable_key::value_t<Set>> {
6060
#endif
6161
};
6262

63-
template <typename First, typename... Rest>
64-
struct PropertyMetaInfo<calls_indirectly_key::value_t<First, Rest...>> {
65-
static_assert(
66-
sizeof...(Rest) == 0,
67-
"assume_indirect_calls_to property only supports a single set for now");
63+
#ifdef __SYCL_DEVICE_ONLY__
64+
// Helper to concatenate several lists of characters into a single string.
65+
// Lists are separated from each other with comma within the resulting string.
66+
template <typename List, typename... Rest> struct ConcatenateCharsToStr;
67+
68+
// Specialization for a single list
69+
template <char... Chars> struct ConcatenateCharsToStr<CharList<Chars...>> {
70+
static constexpr char value[] = {Chars..., '\0'};
71+
};
72+
73+
// Specialization for two lists
74+
template <char... Chars, char... CharsToAppend>
75+
struct ConcatenateCharsToStr<CharList<Chars...>, CharList<CharsToAppend...>>
76+
: ConcatenateCharsToStr<CharList<Chars..., ',', CharsToAppend...>> {};
77+
78+
// Specialization for the case when there are more than two lists
79+
template <char... Chars, char... CharsToAppend, typename... Rest>
80+
struct ConcatenateCharsToStr<CharList<Chars...>, CharList<CharsToAppend...>,
81+
Rest...>
82+
: ConcatenateCharsToStr<CharList<Chars..., ',', CharsToAppend...>,
83+
Rest...> {};
84+
85+
// Helper to convert type T to a list of characters representing the type (its
86+
// mangled name).
87+
template <typename T, size_t... Indices> struct StableNameToCharsHelper {
88+
using chars = CharList<__builtin_sycl_unique_stable_name(T)[Indices]...>;
89+
};
90+
91+
// Wrapper helper for the struct above
92+
template <typename T, typename Sequence> struct StableNameToChars;
93+
94+
// Specialization of that wrapper helper which accepts sequence of integers
95+
template <typename T, size_t... Indices>
96+
struct StableNameToChars<T, std::integer_sequence<size_t, Indices...>>
97+
: StableNameToCharsHelper<T, Indices...> {};
98+
99+
// Creates a comma-separated string with unique stable names for each type in
100+
// Ts.
101+
template <typename... Ts>
102+
struct UniqueStableNameListStr
103+
: ConcatenateCharsToStr<typename StableNameToChars<
104+
Ts, std::make_index_sequence<__builtin_strlen(
105+
__builtin_sycl_unique_stable_name(Ts))>>::chars...> {};
106+
#endif // __SYCL_DEVICE_ONLY__
107+
108+
template <typename... SetIds>
109+
struct PropertyMetaInfo<calls_indirectly_key::value_t<SetIds...>> {
68110
static constexpr const char *name = "calls-indirectly";
69111
static constexpr const char *value =
70112
#ifdef __SYCL_DEVICE_ONLY__
71-
// FIXME: we should handle Rest... here as well
72-
__builtin_sycl_unique_stable_name(First);
113+
UniqueStableNameListStr<SetIds...>::value;
73114
#else
74115
"";
75116
#endif

sycl/source/detail/device_impl.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -704,17 +704,26 @@ bool device_impl::has(aspect Aspect) const {
704704
return CallSuccessful && Result != nullptr;
705705
}
706706
case aspect::ext_oneapi_graph: {
707-
bool SupportsCommandBufferUpdate = false;
707+
ur_device_command_buffer_update_capability_flags_t UpdateCapabilities;
708708
bool CallSuccessful =
709709
getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
710-
MDevice, UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_SUPPORT_EXP,
711-
sizeof(SupportsCommandBufferUpdate), &SupportsCommandBufferUpdate,
710+
MDevice, UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP,
711+
sizeof(UpdateCapabilities), &UpdateCapabilities,
712712
nullptr) == UR_RESULT_SUCCESS;
713713
if (!CallSuccessful) {
714714
return false;
715715
}
716716

717-
return has(aspect::ext_oneapi_limited_graph) && SupportsCommandBufferUpdate;
717+
/* The kernel handle update capability is not yet required for the
718+
* ext_oneapi_graph aspect */
719+
ur_device_command_buffer_update_capability_flags_t RequiredCapabilities =
720+
UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS |
721+
UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE |
722+
UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE |
723+
UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET;
724+
725+
return has(aspect::ext_oneapi_limited_graph) &&
726+
(UpdateCapabilities & RequiredCapabilities) == RequiredCapabilities;
718727
}
719728
case aspect::ext_oneapi_limited_graph: {
720729
bool SupportsCommandBuffers = false;

sycl/source/detail/graph_impl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,7 @@ void exec_graph_impl::updateImpl(std::shared_ptr<node_impl> Node) {
14741474
}
14751475
}
14761476

1477+
UpdateDesc.hNewKernel = UrKernel;
14771478
UpdateDesc.numNewMemObjArgs = MemobjDescs.size();
14781479
UpdateDesc.pNewMemObjArgList = MemobjDescs.data();
14791480
UpdateDesc.numNewPointerArgs = PtrDescs.size();

sycl/source/detail/scheduler/commands.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2538,7 +2538,7 @@ ur_result_t enqueueImpCommandBufferKernel(
25382538
ur_result_t Res =
25392539
Adapter->call_nocheck<UrApiKind::urCommandBufferAppendKernelLaunchExp>(
25402540
CommandBuffer, UrKernel, NDRDesc.Dims, &NDRDesc.GlobalOffset[0],
2541-
&NDRDesc.GlobalSize[0], LocalSize, SyncPoints.size(),
2541+
&NDRDesc.GlobalSize[0], LocalSize, 0, nullptr, SyncPoints.size(),
25422542
SyncPoints.size() ? SyncPoints.data() : nullptr, OutSyncPoint,
25432543
OutCommand);
25442544

sycl/test-e2e/DeviceCodeSplit/grf.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,16 @@
1414
// compiler option
1515

1616
// REQUIRES: arch-intel_gpu_pvc
17-
// https://github.com/intel/llvm/issues/14826
18-
// XFAIL: *
1917

20-
// RUN: %{build} -o %t.out
18+
// RUN: %{build} -Wno-error=deprecated-declarations -o %t.out
2119
// Don't use SYCL_UR_TRACE as the output from the L0 adapter logging interferes
2220
// with the regular UR traces we are checking.
2321
// RUN: env UR_LOG_TRACING="level:info;output:stdout;flush:info" UR_ENABLE_LAYERS=UR_LAYER_TRACING %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NO-VAR
2422
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" UR_LOG_TRACING="level:info;output:stdout;flush:info" UR_ENABLE_LAYERS=UR_LAYER_TRACING %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-WITH-VAR
2523
// RUN: %{build} -DUSE_NEW_API=1 -o %t.out
2624
// RUN: env UR_LOG_TRACING="level:info;output:stdout;flush:info" UR_ENABLE_LAYERS=UR_LAYER_TRACING %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NO-VAR
2725
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" UR_LOG_TRACING="level:info;output:stdout;flush:info" UR_ENABLE_LAYERS=UR_LAYER_TRACING %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-WITH-VAR
28-
// RUN: %{build} -DUSE_AUTO_GRF=1 -o %t.out
26+
// RUN: %{build} -DUSE_AUTO_GRF=1 -Wno-error=deprecated-declarations -o %t.out
2927
// RUN: env UR_LOG_TRACING="level:info;output:stdout;flush:info" UR_ENABLE_LAYERS=UR_LAYER_TRACING %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-NO-VAR
3028
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" UR_LOG_TRACING="level:info;output:stdout;flush:info" UR_ENABLE_LAYERS=UR_LAYER_TRACING %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-WITH-VAR
3129
// RUN: %{build} -DUSE_NEW_API=1 -DUSE_AUTO_GRF=1 -o %t.out

sycl/test-e2e/KernelAndProgram/target_register_alloc_mode.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// REQUIRES: arch-intel_gpu_pvc
22

3-
// https://github.com/intel/llvm/issues/14826
4-
// XFAIL: arch-intel_gpu_pvc
5-
63
// RUN: %{build} -ftarget-register-alloc-mode=pvc:auto -o %t_with.out
74
// RUN: %{build} -o %t_without.out
85
// RUN: %{build} -ftarget-register-alloc-mode=pvc:default -o %t_default.out
@@ -11,7 +8,7 @@
118
// RUN: env SYCL_UR_TRACE=2 %{run} %t_without.out 2>&1 | FileCheck %if system-windows %{ --implicit-check-not=-ze-intel-enable-auto-large-GRF-mode %} %else %{ --check-prefix=CHECK-OPT %} %s
129
// RUN: env SYCL_UR_TRACE=2 %{run} %t_default.out 2>&1 | FileCheck --implicit-check-not=-ze-intel-enable-auto-large-GRF-mode %s
1310

14-
// CHECK-OPT: ---> urProgramBuild(
11+
// CHECK-OPT: ---> urProgramBuildExp(
1512
// CHECK-SAME-OPT: -ze-intel-enable-auto-large-GRF-mode
1613

1714
#include <sycl/detail/core.hpp>

0 commit comments

Comments
 (0)