Skip to content

Commit 72f55c7

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web' (26 commits)
2 parents e168c96 + fa89ada commit 72f55c7

File tree

157 files changed

+1952
-700
lines changed

Some content is hidden

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

157 files changed

+1952
-700
lines changed

.github/workflows/linux_single_e2e.yml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
required: True
1616
image_options:
1717
type: string
18-
required: False
18+
required: True
1919

2020
target_devices:
2121
type: string
@@ -59,6 +59,43 @@ on:
5959
default: '{}'
6060
required: False
6161

62+
workflow_dispatch:
63+
inputs:
64+
runner:
65+
type: choice
66+
options:
67+
- '["Linux", "gen12"]'
68+
- '["amdgpu"]'
69+
image:
70+
description: |
71+
Use option ending with ":build" for AMDGPU, ":latest" for the rest.
72+
type: choice
73+
options:
74+
- 'ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:latest'
75+
- 'ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build'
76+
image_options:
77+
description: |
78+
Use option with "--device=/dev/kfd" for AMDGPU, without it for the rest.
79+
type: choice
80+
options:
81+
- '-u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN'
82+
- '-u 1001 --device=/dev/dri --device=/dev/kfd --privileged --cap-add SYS_ADMIN'
83+
target_devices:
84+
type: choice
85+
options:
86+
- 'opencl:cpu'
87+
- 'opencl:gpu'
88+
- 'opencl:acc'
89+
- 'ext_oneapi_level_zero:gpu'
90+
- 'ext_oneapi_hip:gpu'
91+
- 'ext_intel_esimd_emulator:gpu'
92+
93+
env:
94+
description: |
95+
Suggested variables: LIT_FILTER, LIT_FILTER_OUT. LIT_OPTS won't work
96+
as we redefine it as part of this workflow.
97+
default: '{"LIT_FILTER":""}'
98+
6299
jobs:
63100
lin_e2e_only:
64101
name: ${{ inputs.name }}
@@ -83,7 +120,7 @@ jobs:
83120
- uses: ./devops/actions/cached_checkout
84121
with:
85122
path: llvm
86-
ref: ${{ inputs.ref }}
123+
ref: ${{ inputs.ref || github.sha }}
87124
merge_ref: ${{ inputs.merge_ref }}
88125
cache_path: "/__w/repo_cache/"
89126
- name: Install drivers

.github/workflows/sycl_cleanup.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/sycl_detect_changes.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,9 @@ jobs:
4949
- 'sycl/!(test-e2e|doc)/**'
5050
ci:
5151
- .github/workflows/**
52-
- devops/*/**
5352
# devops/* contains config files, including drivers versions.
5453
# Allow them to be tested in pre-commit.
55-
drivers_and_configs: &drivers_and_configs
56-
- devops/*
57-
test_build:
58-
- *sycl
59-
- *drivers_and_configs
60-
# Temporary, until plugins are enabled in nightly image.
61-
- sycl/**
54+
- devops/*/**
6255
6356
- name: Set output
6457
id: result
@@ -71,6 +64,6 @@ jobs:
7164
return '${{ steps.changes.outputs.changes }}';
7265
}
7366
// Treat everything as changed for huge PRs.
74-
return ["llvm", "llvm_spirv", "clang", "sycl_fusion", "xptifw", "libclc", "sycl", "ci", "drivers_and_configs", "test_build"];
67+
return ["llvm", "llvm_spirv", "clang", "sycl_fusion", "xptifw", "libclc", "sycl", "ci"];
7568
7669
- run: echo '${{ steps.result.outputs.result }}'

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ on:
7373
type: string
7474
required: false
7575
default: 'SYCL-2020'
76-
check_filters:
76+
changes:
7777
type: string
7878
description: 'Filter matches for the changed files in the PR'
7979
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
@@ -136,35 +136,35 @@ jobs:
136136
id: build
137137
run: cmake --build $GITHUB_WORKSPACE/build
138138
- name: check-llvm
139-
if: always() && !cancelled() && contains(inputs.check_filters, 'llvm')
139+
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
140140
run: |
141141
cmake --build $GITHUB_WORKSPACE/build --target check-llvm
142142
- name: check-clang
143-
if: always() && !cancelled() && contains(inputs.check_filters, 'clang')
143+
if: always() && !cancelled() && contains(inputs.changes, 'clang')
144144
run: |
145145
# Can we move this to Dockerfile? Hopefully, noop on Windows.
146146
export XDG_CACHE_HOME=$GITHUB_WORKSPACE/os_cache
147147
cmake --build $GITHUB_WORKSPACE/build --target check-clang
148148
- name: check-sycl
149-
if: always() && !cancelled() && contains(inputs.check_filters, 'sycl')
149+
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
150150
run: |
151151
# TODO consider moving this to Dockerfile.
152152
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
153153
cmake --build $GITHUB_WORKSPACE/build --target check-sycl
154154
- name: check-llvm-spirv
155-
if: always() && !cancelled() && contains(inputs.check_filters, 'llvm_spirv')
155+
if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv')
156156
run: |
157157
cmake --build $GITHUB_WORKSPACE/build --target check-llvm-spirv
158158
- name: check-xptifw
159-
if: always() && !cancelled() && contains(inputs.check_filters, 'xptifw')
159+
if: always() && !cancelled() && contains(inputs.changes, 'xptifw')
160160
run: |
161161
cmake --build $GITHUB_WORKSPACE/build --target check-xptifw
162162
- name: check-libclc
163-
if: always() && !cancelled() && contains(inputs.check_filters, 'libclc')
163+
if: always() && !cancelled() && contains(inputs.changes, 'libclc')
164164
run: |
165165
cmake --build $GITHUB_WORKSPACE/build --target check-libclc
166166
- name: check-libdevice
167-
if: always() && !cancelled() && contains(inputs.check_filters, 'libdevice')
167+
if: always() && !cancelled() && contains(inputs.changes, 'libdevice')
168168
run: |
169169
cmake --build $GITHUB_WORKSPACE/build --target check-libdevice
170170
- name: Install

.github/workflows/sycl_linux_gen12_exp.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/sycl_nightly.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ jobs:
1111
name: Generate Test Matrix
1212
uses: ./.github/workflows/sycl_gen_test_matrix.yml
1313
with:
14-
# Restore once plugins are enabled in the build.
15-
# lts_config: "hip_amdgpu;ocl_gen12;ocl_x64;l0_gen12;esimd_emu;cuda_aws;win_l0_gen12"
16-
lts_config: "ocl_gen12;ocl_x64;l0_gen12;win_l0_gen12"
14+
lts_config: "hip_amdgpu;ocl_gen12;ocl_x64;l0_gen12;esimd_emu;cuda_aws;win_l0_gen12"
1715

1816
ubuntu2204_build_test:
1917
if: github.repository == 'intel/llvm'
@@ -23,11 +21,11 @@ jobs:
2321
with:
2422
build_cache_root: "/__w/"
2523
build_artifact_suffix: default-2204
24+
build_configure_extra_args: '--hip --cuda --enable-esimd-emulator'
2625
merge_ref: ''
2726
retention-days: 90
2827
lts_matrix: ${{ needs.test_matrix.outputs.lts_lx_matrix }}
2928
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}
30-
build_configure_extra_args: ''
3129

3230
ubuntu2204_opaque_pointers_build_test:
3331
if: github.repository == 'intel/llvm'
@@ -63,7 +61,7 @@ jobs:
6361
- name: Build and Push Container (with drivers)
6462
uses: ./devops/actions/build_container
6563
with:
66-
push: ${{ github.event_name != 'pull_request' }}
64+
push: ${{ github.ref_name == 'sycl' }}
6765
file: ubuntu2204_preinstalled
6866
username: ${{ github.repository_owner }}
6967
password: ${{ secrets.GITHUB_TOKEN }}
@@ -76,7 +74,7 @@ jobs:
7674
- name: Build and Push Container (no drivers)
7775
uses: ./devops/actions/build_container
7876
with:
79-
push: ${{ github.event_name != 'pull_request' }}
77+
push: ${{ github.ref_name == 'sycl' }}
8078
file: ubuntu2204_preinstalled
8179
username: ${{ github.repository_owner }}
8280
password: ${{ secrets.GITHUB_TOKEN }}
@@ -89,7 +87,7 @@ jobs:
8987
- name: Build and Push Container (Build image)
9088
uses: ./devops/actions/build_container
9189
with:
92-
push: ${{ github.event_name != 'pull_request' }}
90+
push: ${{ github.ref_name == 'sycl' }}
9391
file: ubuntu2204_preinstalled
9492
username: ${{ github.repository_owner }}
9593
password: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sycl_precommit_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ jobs:
9292
build_cache_suffix: "default"
9393
lts_matrix: ${{ needs.test_matrix.outputs.lts_lx_matrix }}
9494
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}
95-
check_filters: ${{ needs.detect_changes.outputs.filters }}
95+
changes: ${{ needs.detect_changes.outputs.filters }}

.github/workflows/sycl_precommit_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ jobs:
8484
with:
8585
lts_matrix: ${{ needs.test_matrix.outputs.lts_wn_matrix }}
8686
build_ref: ${{ github.event.pull_request.head.sha }}
87-
check_filters: ${{ needs.detect_changes.outputs.filters }}
87+
changes: ${{ needs.detect_changes.outputs.filters }}

.github/workflows/sycl_windows_build_and_test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
type: string
1919
required: false
2020
default: ""
21-
check_filters:
21+
changes:
2222
type: string
2323
description: 'Filter matches for the changed files in the PR'
2424
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
@@ -77,27 +77,27 @@ jobs:
7777
run: |
7878
cmake --build build --target sycl-toolchain
7979
- name: check-llvm
80-
if: always() && !cancelled() && contains(inputs.check_filters, 'llvm')
80+
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
8181
run: |
8282
cmake --build build --target check-llvm
8383
- name: check-clang
84-
if: always() && !cancelled() && contains(inputs.check_filters, 'clang')
84+
if: always() && !cancelled() && contains(inputs.changes, 'clang')
8585
run: |
8686
cmake --build build --target check-clang
8787
- name: check-sycl
88-
if: always() && !cancelled() && contains(inputs.check_filters, 'sycl')
88+
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
8989
run: |
9090
cmake --build build --target check-sycl
9191
- name: check-llvm-spirv
92-
if: always() && !cancelled() && contains(inputs.check_filters, 'llvm_spirv')
92+
if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv')
9393
run: |
9494
cmake --build build --target check-llvm-spirv
9595
- name: check-xptifw
96-
if: always() && !cancelled() && contains(inputs.check_filters, 'xptifw')
96+
if: always() && !cancelled() && contains(inputs.changes, 'xptifw')
9797
run: |
9898
cmake --build build --target check-xptifw
9999
- name: check-libdevice
100-
if: always() && !cancelled() && contains(inputs.check_filters, 'libdevice')
100+
if: always() && !cancelled() && contains(inputs.changes, 'libdevice')
101101
run: |
102102
cmake --build build --target check-libdevice
103103
- name: Install

clang/docs/ClangOffloadPackager.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ the following values for the :ref:`offload kind<table-offload_kind>` and the
112112
+------------+-------+---------------------------------------+
113113
| OFK_HIP | 0x03 | The producer was HIP |
114114
+------------+-------+---------------------------------------+
115+
| OFK_SYCL | 0x04 | The producer was SYCL |
116+
+------------+-------+---------------------------------------+
115117

116118
The flags are used to signify certain conditions, such as the presence of
117119
debugging information or whether or not LTO was used. The string entry table is

clang/include/clang/Basic/Builtins.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,6 +1757,9 @@ BUILTIN(__builtin_ms_va_copy, "vc*&c*&", "n")
17571757
// Arithmetic Fence: to prevent FP reordering and reassociation optimizations
17581758
LANGBUILTIN(__arithmetic_fence, "v.", "tE", ALL_LANGUAGES)
17591759

1760+
// Builtins for Intel SYCL
1761+
BUILTIN(__builtin_intel_sycl_ptr_annotation, "v.", "nt")
1762+
17601763
// Builtins for Intel FPGA
17611764
BUILTIN(__builtin_intel_fpga_reg, "v.", "nt")
17621765
BUILTIN(__builtin_intel_fpga_mem, "v.", "nt")

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ def err_intel_fpga_mem_arg_mismatch
167167
"a pointer"
168168
"|a non-negative integer constant}0">;
169169

170+
def err_intel_sycl_ptr_annotation_arg_number_mismatch
171+
:Error<"number of parameters must be odd number">;
172+
def err_intel_sycl_ptr_annotation_mismatch
173+
: Error<"builtin parameter must be %select{"
174+
"a pointer"
175+
"|a string literal or constexpr const char*}0">;
176+
170177
// C99 variable-length arrays
171178
def ext_vla : Extension<"variable length arrays are a C99 feature">,
172179
InGroup<VLAExtension>;

clang/include/clang/Driver/Options.td

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,11 +3167,13 @@ def fsycl_device_obj_EQ : Joined<["-"], "fsycl-device-obj=">,
31673167
"device code stored in the resulting object. Valid values are: spirv, llvmir "
31683168
"(default)">;
31693169
def fsycl_use_bitcode : Flag<["-"], "fsycl-use-bitcode">,
3170-
Alias<fsycl_device_obj_EQ>, AliasArgs<["llvmir"]>, Flags<[CoreOption]>,
3171-
HelpText<"Use LLVM bitcode instead of SPIR-V in fat objects">;
3170+
Alias<fsycl_device_obj_EQ>, AliasArgs<["llvmir"]>,
3171+
Flags<[CoreOption, Deprecated]>,
3172+
HelpText<"Use LLVM bitcode instead of SPIR-V in fat objects (deprecated)">;
31723173
def fno_sycl_use_bitcode : Flag<["-"], "fno-sycl-use-bitcode">,
3173-
Alias<fsycl_device_obj_EQ>, AliasArgs<["spirv"]>, Flags<[CoreOption]>,
3174-
HelpText<"Use SPIR-V instead of LLVM bitcode in fat objects">;
3174+
Alias<fsycl_device_obj_EQ>, AliasArgs<["spirv"]>,
3175+
Flags<[CoreOption, Deprecated]>,
3176+
HelpText<"Use SPIR-V instead of LLVM bitcode in fat objects (deprecated)">;
31753177
def fsycl_link_EQ : Joined<["-"], "fsycl-link=">,
31763178
Flags<[CC1Option, CoreOption]>, HelpText<"Generate partially linked device and host object to be used at various stages of compilation">, Values<"image,early">;
31773179
def fsycl_link : Flag<["-"], "fsycl-link">, Alias<fsycl_link_EQ>,

clang/include/clang/Sema/Sema.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14052,6 +14052,9 @@ class Sema final {
1405214052
bool CheckIntelFPGARegBuiltinFunctionCall(unsigned BuiltinID, CallExpr *Call);
1405314053
bool CheckIntelFPGAMemBuiltinFunctionCall(CallExpr *Call);
1405414054

14055+
bool CheckIntelSYCLPtrAnnotationBuiltinFunctionCall(unsigned BuiltinID,
14056+
CallExpr *Call);
14057+
1405514058
bool SemaBuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall);
1405614059
bool SemaBuiltinVAStartARMMicrosoft(CallExpr *Call);
1405714060
bool SemaBuiltinUnorderedCompare(CallExpr *TheCall);

0 commit comments

Comments
 (0)