Skip to content

Commit 38a2577

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into aaron/optionalInfoQueries
2 parents 7866c2e + 2a97b05 commit 38a2577

25 files changed

+627
-454
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ on:
66
- sycl
77
paths:
88
- 'devops/actions/build_container/**'
9+
- 'devops/scripts/**'
910
- 'devops/dependencies-igc-dev.json'
1011
- '.github/workflows/sycl-containers-igc-dev.yaml'
1112
pull_request:
1213
paths:
1314
- 'devops/actions/build_container/**'
15+
- 'devops/scripts/**'
1416
- 'devops/dependencies-igc-dev.json'
1517
- '.github/workflows/sycl-containers-igc-dev.yaml'
1618

.github/workflows/sycl-containers.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
file: ${{ matrix.file }}
7979
username: ${{ github.repository_owner }}
8080
password: ${{ secrets.GITHUB_TOKEN }}
81+
sycl_ci_passwd: ${{ secrets.DOCKER_SUDO_PASSWORD }}
8182
tags: |
8283
ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}-${{ github.sha }}
8384
ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ jobs:
134134
install_dev_igc_driver: >-
135135
${{ !contains(matrix.target_devices, 'ext_oneapi_cuda') &&
136136
!contains(matrix.target_devices, 'ext_oneapi_hip') &&
137-
matrix.use_igc_dev && contains(needs.detect_changes.outputs.filters, 'devigccfg') ||
137+
matrix.use_igc_dev &&
138+
(contains(needs.detect_changes.outputs.filters, 'devigccfg') || contains(needs.detect_changes.outputs.filters, 'drivers')) ||
138139
'false' }}
139140
# Run only if the PR does not have the 'ci-no-devigc' label.
140141
skip_run: ${{matrix.use_igc_dev && contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') || 'false'}}

devops/actions/build_container/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ inputs:
2121
file:
2222
description: "Dockerfile"
2323
required: true
24+
sycl_ci_passwd:
25+
description: "Password to assign to sycl_ci user within a container"
26+
required: true
2427

2528
runs:
2629
using: "composite"
@@ -41,3 +44,4 @@ runs:
4144
file: ${{ github.workspace }}/devops/containers/${{ inputs.file }}.Dockerfile
4245
secrets: |
4346
github_token=${{ github.token }}
47+
sycl_ci_passwd=${{ inputs.sycl_ci_passwd }}

devops/dependencies-igc-dev.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"linux": {
33
"igc_dev": {
4-
"github_tag": "igc-dev-3db59df",
5-
"version": "3db59df",
6-
"updated_at": "2024-12-03T20:43:00Z",
7-
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/2248119261/zip",
4+
"github_tag": "igc-dev-e0d826a",
5+
"version": "e0d826a",
6+
"updated_at": "2024-12-17T21:18:30Z",
7+
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/2327583926/zip",
88
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
99
}
1010
}

devops/scripts/install_drivers.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ InstallIGFX () {
162162
echo "Install libopencl-clang"
163163
# Workaround only, will download deb and install with dpkg once fixed.
164164
cp -d libopencl-clang.so.14* /usr/local/lib/
165+
rm /usr/local/lib/libigc.so /usr/local/lib/libigc.so.1* && \
166+
ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so && \
167+
ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so.1
165168
echo "Clean up"
166169
rm *.deb libopencl-clang.so.14*
167170
echo "$IGC_DEV_TAG" > /usr/local/lib/igc/IGCTAG.txt

llvm/include/llvm/SYCLLowerIR/DeviceConfigFile.td

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,26 @@ class IntelTargetInfo<string Name, list<Aspect> Aspects, list<int> subGroupSizes
189189
// Note: only the "canonical" target names are listed here - see
190190
// SYCL::gen::resolveGenDevice().
191191
//
192-
// TODO: instructions on how to get "???" values below are required. Currently
193-
// device architectures below which have "???" in it are not fully supported.
194-
//
195-
// def : IntelTargetInfo<"intel_gpu_ptl_u", ???, ???>;
196-
// def : IntelTargetInfo<"intel_gpu_ptl_h", ???, ???>;
192+
// When adding the new Intel architectures, the ideal way to get these
193+
// values is to run sycl-ls --verbose on the target machine. However,
194+
// if you don't have access to the target machine, then you can look in
195+
// the intel/compute-runtime source code to get the values. For
196+
// the fp64 and atomic64 aspects, look for the definition
197+
// of specific RuntimeCapabilityTable's. These will be defined in
198+
// a file called hw_info_<device>.cpp. For example, for PVC, it
199+
// would be hw_info_pvc.cpp. For fp16, this is supported by all
200+
// Intel GPUs currently. (see definition of getDeviceExtensions in
201+
// compiler_product_helper_base.inl). For the supported sub-group sizes,
202+
// it is not as straightforward. They are defined per family in
203+
// GfxCoreHelperHw<Family>::getDeviceSubGroupSizes and by default
204+
// the default sub-group sizes are 8, 16, and 32. (see gfx_core_helper_base.inl)
205+
// However, this can be overriden by specific families. For example,
206+
// gfx_core_helper_xe_hpc_core.cpp defines the supported sub-group
207+
// sizes to be 16 and 32, which corresponds to PVC having 16 and 32
208+
// as sub-group sizes the supported sub-group sizes.
209+
210+
def : IntelTargetInfo<"intel_gpu_ptl_u", Fp16Fp64Atomic64, Sg16_32>;
211+
def : IntelTargetInfo<"intel_gpu_ptl_h", Fp16Fp64Atomic64, Sg16_32>;
197212
def : IntelTargetInfo<"intel_gpu_lnl_m", Fp16Fp64Atomic64, Sg16_32>;
198213
def : IntelTargetInfo<"intel_gpu_bmg_g21", Fp16Fp64Atomic64, Sg16_32>;
199214
def : IntelTargetInfo<"intel_gpu_arl_h", Fp16Fp64Atomic64, Sg8_16_32>;

sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc

Lines changed: 75 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,6 +2075,45 @@ recording mode, as opposed to throwing.
20752075
This section defines the interaction of `sycl_ext_oneapi_graph` with other
20762076
extensions.
20772077

2078+
==== sycl_ext_codeplay_enqueue_native_command
2079+
2080+
`ext_codeplay_enqueue_native_command`, defined in
2081+
link:../experimental/sycl_ext_codeplay_enqueue_native_command.asciidoc[sycl_ext_codeplay_enqueue_native_command]
2082+
cannot be used in graph nodes. A synchronous exception will be thrown with error
2083+
code `invalid` if a user tries to add them to a graph.
2084+
2085+
Removing this restriction is something we may look at for future revisions of
2086+
`sycl_ext_oneapi_graph`.
2087+
2088+
==== sycl_ext_intel_queue_index
2089+
2090+
The compute index queue property defined by
2091+
link:../supported/sycl_ext_intel_queue_index.asciidoc[sycl_ext_intel_queue_index]
2092+
is ignored during queue recording.
2093+
2094+
Using this information is something we may look at for future revisions of
2095+
`sycl_ext_oneapi_graph`.
2096+
2097+
==== sycl_ext_oneapi_bindless_images
2098+
2099+
The new handler methods, and queue shortcuts, defined by
2100+
link:../experimental/sycl_ext_oneapi_bindless_images.asciidoc[sycl_ext_oneapi_bindless_images]
2101+
cannot be used in graph nodes. A synchronous exception will be thrown with error
2102+
code `invalid` if a user tries to add them to a graph.
2103+
2104+
Removing this restriction is something we may look at for future revisions of
2105+
`sycl_ext_oneapi_graph`.
2106+
2107+
==== sycl_ext_oneapi_device_global
2108+
2109+
The new handler methods, and queue shortcuts, defined by
2110+
link:../experimental/sycl_ext_oneapi_device_global.asciidoc[sycl_ext_oneapi_device_global].
2111+
cannot be used in graph nodes. A synchronous exception will be thrown with error
2112+
code `invalid` if a user tries to add them to a graph.
2113+
2114+
Removing this restriction is something we may look at for future revisions of
2115+
`sycl_ext_oneapi_graph`.
2116+
20782117
==== sycl_ext_oneapi_discard_queue_events
20792118

20802119
When recording a `sycl::queue` which has been created with the
@@ -2108,37 +2147,25 @@ nodes that are recorded from multiple queues and/or added by the explicit API:
21082147
* The only commands which have an implicit dependency on the barrier command
21092148
are those recorded from the same queue the barrier command was submitted to.
21102149

2111-
==== sycl_ext_oneapi_memcpy2d
2112-
2113-
The new handler methods, and queue shortcuts, defined by
2114-
link:../supported/sycl_ext_oneapi_memcpy2d.asciidoc[sycl_ext_oneapi_memcpy2d]
2115-
cannot be used in graph nodes. A synchronous exception will be thrown with
2116-
error code `invalid` if a user tries to add them to a graph.
2117-
2118-
Removing this restriction is something we may look at for future revisions of
2119-
`sycl_ext_oneapi_graph`.
2120-
2121-
==== sycl_ext_oneapi_queue_priority
2122-
2123-
The queue priority property defined by
2124-
link:../supported/sycl_ext_oneapi_queue_priority.asciidoc[sycl_ext_oneapi_queue_priority]
2125-
is ignored during queue recording.
2150+
==== sycl_ext_oneapi_enqueue_functions
21262151

2127-
==== sycl_ext_oneapi_queue_empty
2152+
The command submission functions defined in
2153+
link:../experimental/sycl_ext_oneapi_enqueue_functions.asciidoc[sycl_ext_oneapi_enqueue_functions]
2154+
can be used adding nodes to a graph when creating a graph from queue recording.
2155+
New methods are also defined that enable submitting an executable graph,
2156+
e.g. directly to a queue without returning an event.
21282157

2129-
The `queue::ext_oneapi_empty()` query defined by the
2130-
link:../supported/sycl_ext_oneapi_queue_empty.asciidoc[sycl_ext_oneapi_queue_empty]
2131-
extension behaves as normal during queue recording and is not captured to the graph.
2132-
Recorded commands are not counted as submitted for the purposes of this query.
2158+
==== sycl_ext_oneapi_free_function_kernels
21332159

2134-
==== sycl_ext_intel_queue_index
2160+
`sycl_ext_oneapi_free_function_kernels`, defined in
2161+
link:../proposed/sycl_ext_oneapi_free_function_kernels.asciidoc[sycl_ext_oneapi_free_function_kernels]
2162+
can be used with SYCL Graphs.
21352163

2136-
The compute index queue property defined by
2137-
link:../supported/sycl_ext_intel_queue_index.asciidoc[sycl_ext_intel_queue_index]
2138-
is ignored during queue recording.
2164+
==== sycl_ext_oneapi_kernel_compiler_spirv
21392165

2140-
Using this information is something we may look at for future revisions of
2141-
`sycl_ext_oneapi_graph`.
2166+
The kernels loaded using
2167+
link:../experimental/sycl_ext_oneapi_kernel_compiler_spirv.asciidoc[sycl_ext_oneapi_kernel_compiler_spirv]
2168+
behave as normal when used in graph nodes.
21422169

21432170
==== sycl_ext_oneapi_kernel_properties
21442171

@@ -2147,62 +2174,41 @@ link:../experimental/sycl_ext_oneapi_kernel_properties.asciidoc[sycl_ext_oneapi_
21472174
can be used in graph nodes in the same way as they are used in normal queue
21482175
submission.
21492176

2150-
==== sycl_ext_oneapi_prod
2177+
==== sycl_ext_oneapi_local_memory
21512178

2152-
The new `sycl::queue::ext_oneapi_prod()` method added by
2153-
link:../proposed/sycl_ext_oneapi_prod.asciidoc[sycl_ext_oneapi_prod]
2154-
behaves as normal during queue recording and is not captured to the graph.
2155-
Recorded commands are not counted as submitted for the purposes of its operation.
2179+
Allocating local memory inside a graph kernel node with `sycl::ext::oneapi::group_local_memory()` or
2180+
`sycl::ext::oneapi::group_local_memory_for_overwrite()` is supported. These methods are defined by
2181+
link:../supported/sycl_ext_oneapi_local_memory.asciidoc[sycl_ext_oneapi_local_memory.]
21562182

2157-
==== sycl_ext_oneapi_device_global
2158-
2159-
The new handler methods, and queue shortcuts, defined by
2160-
link:../experimental/sycl_ext_oneapi_device_global.asciidoc[sycl_ext_oneapi_device_global].
2161-
cannot be used in graph nodes. A synchronous exception will be thrown with error
2162-
code `invalid` if a user tries to add them to a graph.
2163-
2164-
Removing this restriction is something we may look at for future revisions of
2165-
`sycl_ext_oneapi_graph`.
2166-
2167-
==== sycl_ext_oneapi_bindless_images
2183+
==== sycl_ext_oneapi_memcpy2d
21682184

21692185
The new handler methods, and queue shortcuts, defined by
2170-
link:../experimental/sycl_ext_oneapi_bindless_images.asciidoc[sycl_ext_oneapi_bindless_images]
2171-
cannot be used in graph nodes. A synchronous exception will be thrown with error
2172-
code `invalid` if a user tries to add them to a graph.
2186+
link:../supported/sycl_ext_oneapi_memcpy2d.asciidoc[sycl_ext_oneapi_memcpy2d]
2187+
cannot be used in graph nodes. A synchronous exception will be thrown with
2188+
error code `invalid` if a user tries to add them to a graph.
21732189

21742190
Removing this restriction is something we may look at for future revisions of
21752191
`sycl_ext_oneapi_graph`.
21762192

2177-
==== sycl_ext_oneapi_kernel_compiler_spirv
2178-
2179-
The kernels loaded using
2180-
link:../experimental/sycl_ext_oneapi_kernel_compiler_spirv.asciidoc[sycl_ext_oneapi_kernel_compiler_spirv]
2181-
behave as normal when used in graph nodes.
2182-
2183-
==== sycl_ext_codeplay_enqueue_native_command
2184-
2185-
`ext_codeplay_enqueue_native_command`, defined in
2186-
link:../experimental/sycl_ext_codeplay_enqueue_native_command.asciidoc[sycl_ext_codeplay_enqueue_native_command]
2187-
cannot be used in graph nodes. A synchronous exception will be thrown with error
2188-
code `invalid` if a user tries to add them to a graph.
2193+
==== sycl_ext_oneapi_prod
21892194

2190-
Removing this restriction is something we may look at for future revisions of
2191-
`sycl_ext_oneapi_graph`.
2195+
The new `sycl::queue::ext_oneapi_prod()` method added by
2196+
link:../proposed/sycl_ext_oneapi_prod.asciidoc[sycl_ext_oneapi_prod]
2197+
behaves as normal during queue recording and is not captured to the graph.
2198+
Recorded commands are not counted as submitted for the purposes of its operation.
21922199

2193-
==== sycl_ext_oneapi_enqueue_functions
2200+
==== sycl_ext_oneapi_queue_empty
21942201

2195-
The command submission functions defined in
2196-
link:../experimental/sycl_ext_oneapi_enqueue_functions.asciidoc[sycl_ext_oneapi_enqueue_functions]
2197-
can be used adding nodes to a graph when creating a graph from queue recording.
2198-
New methods are also defined that enable submitting an executable graph,
2199-
e.g. directly to a queue without returning an event.
2202+
The `queue::ext_oneapi_empty()` query defined by the
2203+
link:../supported/sycl_ext_oneapi_queue_empty.asciidoc[sycl_ext_oneapi_queue_empty]
2204+
extension behaves as normal during queue recording and is not captured to the graph.
2205+
Recorded commands are not counted as submitted for the purposes of this query.
22002206

2201-
==== sycl_ext_oneapi_free_function_kernels
2207+
==== sycl_ext_oneapi_queue_priority
22022208

2203-
`sycl_ext_oneapi_free_function_kernels`, defined in
2204-
link:../proposed/sycl_ext_oneapi_free_function_kernels.asciidoc[sycl_ext_oneapi_free_function_kernels]
2205-
can be used with SYCL Graphs.
2209+
The queue priority property defined by
2210+
link:../supported/sycl_ext_oneapi_queue_priority.asciidoc[sycl_ext_oneapi_queue_priority]
2211+
is ignored during queue recording.
22062212

22072213
==== sycl_ext_oneapi_work_group_memory
22082214

sycl/include/sycl/detail/type_traits.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,22 @@ struct map_type<T, From, To, Rest...> {
384384
template <typename T, typename... Ts>
385385
constexpr bool check_type_in_v = ((std::is_same_v<T, Ts> || ...));
386386

387+
#if __has_builtin(__type_pack_element)
388+
template <int N, typename... Ts>
389+
using nth_type_t = __type_pack_element<N, Ts...>;
390+
#else
391+
template <int N, typename T, typename... Ts> struct nth_type {
392+
using type = typename nth_type<N - 1, Ts...>::type;
393+
};
394+
395+
template <typename T, typename... Ts> struct nth_type<0, T, Ts...> {
396+
using type = T;
397+
};
398+
399+
template <int N, typename... Ts>
400+
using nth_type_t = typename nth_type<N, Ts...>::type;
401+
#endif
402+
387403
} // namespace detail
388404
} // namespace _V1
389405
} // namespace sycl

0 commit comments

Comments
 (0)