Skip to content

Commit 2a178bc

Browse files
Merge remote-tracking branch 'intel_llvm/sycl' into matrixuse
2 parents 3c1f7bc + f44edce commit 2a178bc

File tree

130 files changed

+1370
-2289
lines changed

Some content is hidden

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

130 files changed

+1370
-2289
lines changed

.github/workflows/sycl_resolve_test_matrix.yml renamed to .github/workflows/sycl_gen_test_matrix.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,21 @@ on:
2424
type: string
2525
required: false
2626
default: ${{ github.run_id }}-${{ github.run_attempt }}
27+
ref:
28+
description: "Commit to use for checkout or github.sha by default"
29+
type: string
30+
required: false
31+
default: ${{ github.sha }}
2732
outputs:
2833
lts_matrix:
2934
description: "Generated Matrix"
30-
value: ${{ jobs.resolve_matrix.outputs.lts_matrix }}
35+
value: ${{ jobs.test_matrix.outputs.lts_matrix }}
3136
lts_aws_matrix:
3237
description: "Generated Matrix AWS subset"
33-
value: ${{ jobs.resolve_matrix.outputs.lts_aws_matrix }}
38+
value: ${{ jobs.test_matrix.outputs.lts_aws_matrix }}
3439
jobs:
35-
resolve_matrix:
36-
name: Resolve Test Matrix
40+
test_matrix:
41+
name: Generate Test Matrix
3742
runs-on: ubuntu-latest
3843
outputs:
3944
lts_matrix: ${{ steps.work.outputs.lts_matrix }}
@@ -42,11 +47,11 @@ jobs:
4247
- name: Download scripts and configs
4348
shell: bash
4449
run: |
45-
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/scripts/generate_test_matrix.js
46-
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/test_configs.json
50+
wget raw.githubusercontent.com/intel/llvm/${{ inputs.ref }}/devops/scripts/generate_test_matrix.js
51+
wget raw.githubusercontent.com/intel/llvm/${{ inputs.ref }}/devops/test_configs.json
4752
wget raw.githubusercontent.com/intel/llvm/sycl/devops/dependencies.json
4853
mv dependencies.json dependencies.sycl.json
49-
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/dependencies.json
54+
wget raw.githubusercontent.com/intel/llvm/${{ inputs.ref }}/devops/dependencies.json
5055
- id: work
5156
uses: actions/github-script@v6
5257
name: Generate matrix

.github/workflows/sycl_nightly.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ on:
1010
- '.github/workflows/sycl_nightly.yml'
1111

1212
jobs:
13-
resolve_matrix:
14-
name: Resolve Test Matrix
15-
uses: ./.github/workflows/sycl_resolve_test_matrix.yml
13+
test_matrix:
14+
name: Generate Test Matrix
15+
uses: ./.github/workflows/sycl_gen_test_matrix.yml
1616
with:
1717
lts_config: "ocl_gen9;ocl_x64"
1818

1919
ubuntu2004_build_test:
2020
if: github.repository == 'intel/llvm'
2121
uses: ./.github/workflows/sycl_linux_build_and_test.yml
22-
needs: resolve_matrix
22+
needs: test_matrix
2323
secrets: inherit
2424
with:
2525
build_cache_root: "/__w/"
@@ -29,7 +29,7 @@ jobs:
2929
ubuntu2004_opaque_pointers_build_test:
3030
if: github.repository == 'intel/llvm'
3131
uses: ./.github/workflows/sycl_linux_build_and_test.yml
32-
needs: resolve_matrix
32+
needs: test_matrix
3333
secrets: inherit
3434
with:
3535
build_cache_root: "/__w/"

.github/workflows/sycl_post_commit.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ on:
1212

1313
jobs:
1414
# This job generates matrix of tests for LLVM Test Suite
15-
resolve_matrix:
16-
name: Resolve Test Matrix
17-
uses: ./.github/workflows/sycl_resolve_test_matrix.yml
15+
test_matrix:
16+
name: Generate Test Matrix
17+
uses: ./.github/workflows/sycl_gen_test_matrix.yml
1818
with:
1919
lts_config: "l0_gen9"
2020
linux_default:
2121
name: Linux Default
22-
needs: resolve_matrix
22+
needs: test_matrix
2323
uses: ./.github/workflows/sycl_linux_build_and_test.yml
2424
secrets: inherit
2525
with:
2626
build_cache_root: "/__w/llvm"
2727
build_artifact_suffix: "post_commit"
28-
lts_matrix: ${{ needs.resolve_matrix.outputs.lts_matrix }}
29-
lts_aws_matrix: ${{ needs.resolve_matrix.outputs.lts_aws_matrix }}
28+
lts_matrix: ${{ needs.test_matrix.outputs.lts_matrix }}
29+
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}
3030
linux_no_assert:
3131
name: Linux (no assert)
3232
uses: ./.github/workflows/sycl_linux_build_and_test.yml

.github/workflows/sycl_precommit.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,18 @@ jobs:
3838
uses: ./devops/actions/clang-format
3939

4040
# This job generates matrix of tests for LLVM Test Suite
41-
resolve_matrix:
42-
name: Resolve Test Matrix
43-
uses: ./.github/workflows/sycl_resolve_test_matrix.yml
41+
test_matrix:
42+
name: Generate Test Matrix
43+
uses: ./.github/workflows/sycl_gen_test_matrix.yml
4444
with:
45+
ref: ${{ github.event.pull_request.head.sha }}
4546
lts_config: "hip_amdgpu;ocl_x64;ocl_gen9;l0_gen9;esimd_emu;cuda"
4647

4748
linux_default:
4849
name: Linux
4950
# Only build and test patches, that have passed all linter checks, because
5051
# the next commit is likely to be a follow-up on that job.
51-
needs: [lint, resolve_matrix]
52+
needs: [lint, test_matrix]
5253
if: always() && (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
5354
uses: ./.github/workflows/sycl_linux_build_and_test.yml
5455
secrets: inherit
@@ -58,5 +59,5 @@ jobs:
5859
build_cache_size: "8G"
5960
build_artifact_suffix: "default"
6061
build_cache_suffix: "default"
61-
lts_matrix: ${{ needs.resolve_matrix.outputs.lts_matrix }}
62-
lts_aws_matrix: ${{ needs.resolve_matrix.outputs.lts_aws_matrix }}
62+
lts_matrix: ${{ needs.test_matrix.outputs.lts_matrix }}
63+
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}

buildbot/configure.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ def do_configure(args):
4444
sycl_enable_xpti_tracing = 'ON'
4545
xpti_enable_werror = 'OFF'
4646

47+
# lld is needed on Windows or for the HIP plugin on AMD
48+
if platform.system() == 'Windows' or (args.hip and args.hip_platform == 'AMD'):
49+
llvm_enable_projects += ';lld'
50+
4751
# replace not append, so ARM ^ X86
4852
if args.arm:
4953
llvm_targets_to_build = 'ARM;AArch64'
@@ -65,8 +69,6 @@ def do_configure(args):
6569
llvm_targets_to_build += ';AMDGPU'
6670
libclc_targets_to_build += libclc_amd_target_names
6771

68-
# The HIP plugin for AMD uses lld for linking
69-
llvm_enable_projects += ';lld'
7072
elif args.hip_platform == 'NVIDIA' and not args.cuda:
7173
llvm_targets_to_build += ';NVPTX'
7274
libclc_targets_to_build += libclc_nvidia_target_names

buildbot/dependency.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ ocl_cpu_rt_ver=2022.14.8.0.04
44
# https://github.com/intel/llvm/releases/download/2022-WW33/win-oclcpuexp-2022.14.8.0.04_rel.zip
55
ocl_cpu_rt_ver_win=2022.14.8.0.04
66
# Same GPU driver supports Level Zero and OpenCL
7-
# https://github.com/intel/compute-runtime/releases/tag/22.31.23852
8-
ocl_gpu_rt_ver=22.31.23852
7+
# https://github.com/intel/compute-runtime/releases/tag/22.35.24055
8+
ocl_gpu_rt_ver=22.35.24055
99
# Same GPU driver supports Level Zero and OpenCL
1010
# https://downloadmirror.intel.com/723911/igfx_win_101.1404.zip
1111
ocl_gpu_rt_ver_win=101.1404
@@ -31,7 +31,7 @@ ocloc_ver_win=101.1404
3131
[DRIVER VERSIONS]
3232
cpu_driver_lin=2022.14.8.0.04
3333
cpu_driver_win=2022.14.8.0.04
34-
gpu_driver_lin=22.31.23852
34+
gpu_driver_lin=22.35.24055
3535
gpu_driver_win=101.1404
3636
fpga_driver_lin=2022.14.8.0.04
3737
fpga_driver_win=2022.14.8.0.04

clang/include/clang/Basic/Attr.td

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,23 @@ def SYCLSpecialClass: InheritableAttr {
12811281
let Documentation = [SYCLSpecialClassDocs];
12821282
}
12831283

1284+
def SYCLType: InheritableAttr {
1285+
let Spellings = [CXX11<"__sycl_detail__", "sycl_type">];
1286+
let Subjects = SubjectList<[CXXRecord, Enum], ErrorDiag>;
1287+
let LangOpts = [SYCLIsDevice, SYCLIsHost];
1288+
let Args = [EnumArgument<"Type", "SYCLType",
1289+
["accessor", "local_accessor", "spec_constant",
1290+
"specialization_id", "kernel_handler", "buffer_location",
1291+
"no_alias", "accessor_property_list", "group",
1292+
"private_memory", "aspect"],
1293+
["accessor", "local_accessor", "spec_constant",
1294+
"specialization_id", "kernel_handler", "buffer_location",
1295+
"no_alias", "accessor_property_list", "group",
1296+
"private_memory", "aspect"]>];
1297+
// Only used internally by SYCL implementation
1298+
let Documentation = [InternalOnly];
1299+
}
1300+
12841301
def SYCLDeviceHas : InheritableAttr {
12851302
let Spellings = [CXX11<"sycl", "device_has">];
12861303
let Subjects = SubjectList<[Function], ErrorDiag>;

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4098,6 +4098,8 @@ def warn_transparent_union_attribute_zero_fields : Warning<
40984098
def warn_attribute_type_not_supported : Warning<
40994099
"%0 attribute argument not supported: %1">,
41004100
InGroup<IgnoredAttributes>;
4101+
def err_attribute_argument_not_supported : Error<
4102+
"%0 attribute argument %1 is not supported">;
41014103
def warn_attribute_unknown_visibility : Warning<"unknown visibility %0">,
41024104
InGroup<IgnoredAttributes>;
41034105
def warn_attribute_protected_visibility :

clang/include/clang/Driver/Options.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,12 @@ def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, Flags<[NoXarchOpt
956956
HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
957957
def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[NoXarchOption]>,
958958
HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
959+
def fno_bundle_offload_arch : Flag<["-"], "fno-bundle-offload-arch">,
960+
HelpText<"Specify that the offload bundler should not identify a bundle with "
961+
"specific arch. For example, the bundle for `nvptx64-nvidia-cuda-sm_80` "
962+
"uses the bundle tag `nvptx64-nvidia-cuda` when used. "
963+
"This allows .o files to contain .bc bundles that are unspecific "
964+
"to a particular arch version.">;
959965
def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>,
960966
HelpText<"CUDA offloading device architecture (e.g. sm_35), or HIP offloading target ID in the form of a "
961967
"device architecture followed by target ID features delimited by a colon. Each target ID feature "

clang/include/clang/Sema/Sema.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10858,6 +10858,9 @@ class Sema final {
1085810858
ReqdWorkGroupSizeAttr *
1085910859
MergeReqdWorkGroupSizeAttr(Decl *D, const ReqdWorkGroupSizeAttr &A);
1086010860

10861+
SYCLTypeAttr *MergeSYCLTypeAttr(Decl *D, const AttributeCommonInfo &CI,
10862+
SYCLTypeAttr::SYCLType TypeName);
10863+
1086110864
/// Only called on function definitions; if there is a MSVC #pragma optimize
1086210865
/// in scope, consider changing the function's attributes based on the
1086310866
/// optimization list passed to the pragma.
@@ -13546,12 +13549,16 @@ class Sema final {
1354613549
const CXXRecordDecl *RecTy = Ty->getAsCXXRecordDecl();
1354713550
if (!RecTy)
1354813551
return false;
13552+
13553+
if (RecTy->hasAttr<AttrTy>())
13554+
return true;
13555+
1354913556
if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RecTy)) {
1355013557
ClassTemplateDecl *Template = CTSD->getSpecializedTemplate();
1355113558
if (CXXRecordDecl *RD = Template->getTemplatedDecl())
1355213559
return RD->hasAttr<AttrTy>();
1355313560
}
13554-
return RecTy->hasAttr<AttrTy>();
13561+
return false;
1355513562
}
1355613563

1355713564
private:
@@ -13975,7 +13982,7 @@ class Sema final {
1397513982
KernelConstStaticVariable
1397613983
};
1397713984

13978-
bool isKnownGoodSYCLDecl(const Decl *D);
13985+
bool isDeclAllowedInSYCLDeviceCode(const Decl *D);
1397913986
void checkSYCLDeviceVarDecl(VarDecl *Var);
1398013987
void copySYCLKernelAttrs(const CXXRecordDecl *KernelObj);
1398113988
void ConstructOpenCLKernel(FunctionDecl *KernelCallerFunc, MangleContext &MC);

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,
16001600
StartFunction(GD, ResTy, Fn, FnInfo, Args, Loc, BodyRange.getBegin());
16011601
if (!getLangOpts().OptRecordFile.empty()) {
16021602
SyclOptReportHandler &SyclOptReport = CGM.getDiags().getSYCLOptReport();
1603-
if (Fn && SyclOptReport.HasOptReportInfo(FD)) {
1603+
if (SyclOptReport.HasOptReportInfo(FD)) {
16041604
llvm::OptimizationRemarkEmitter ORE(Fn);
16051605
for (auto ORI : llvm::enumerate(SyclOptReport.GetInfo(FD))) {
16061606
llvm::DiagnosticLocation DL =

0 commit comments

Comments
 (0)