Skip to content

Commit 2754978

Browse files
Merge branch 'sycl' into Alexandr-Konovalov/ref-ndrange
2 parents c7bc868 + c7867ce commit 2754978

File tree

264 files changed

+14006
-2122
lines changed

Some content is hidden

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

264 files changed

+14006
-2122
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,4 @@ sycl/test-e2e/ThreadSanitizer/ @intel/dpcpp-sanitizers-review
226226

227227
# ABI compatibility
228228
devops/compat_ci_exclude.sycl-rel-** @gmlueck @xtian-github
229+
sycl/test/abi/*sycl-rel*.dump @AlexeySachkov @KornevNikita
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This workflow checks for ready-to-merge PRs - if a PR is open, not a draft,
2+
# passed all checks, and has been approved, it will ping @intel/llvm-gatekeepers
3+
# if this group has not already been mentioned or if the last mention was more
4+
# than $days days ago.
5+
6+
name: Check ready-to-merge PRs
7+
8+
on:
9+
schedule:
10+
- cron: '0 * * * *' # every hour
11+
workflow_dispatch:
12+
13+
permissions: read-all
14+
15+
jobs:
16+
notify-ready-prs:
17+
permissions:
18+
pull-requests: write
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check
22+
env:
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
# Number of days before repeating the gatekeepers ping
26+
days=3
27+
days_in_seconds=$((days*24*60*60))
28+
29+
# Function to ping gatekeepers and print debug info
30+
ping_gatekeepers() {
31+
pr_number=$1
32+
gh pr comment "$pr_number" --repo intel/llvm --body "@intel/llvm-gatekeepers please consider merging"
33+
echo "Pinged @intel/llvm-gatekeepers for https://github.com/intel/llvm/pull/$pr_number"
34+
}
35+
36+
# Get the list of suitable PRs
37+
prs=$(gh pr list --search "is:open review:approved draft:no status:success" --repo intel/llvm --json number --jq '.[].number')
38+
now=$(date -u +%s)
39+
for pr in $prs; do
40+
# Get the timestamp of the latest comment mentioning @intel/llvm-gatekeepers
41+
latest_ts=$(gh pr view $pr --repo intel/llvm --json comments \
42+
--jq '[.comments[] | select(.body | test("@intel/llvm-gatekeepers")) | .createdAt] | last')
43+
# If there is no previous mention, ping the gatekeepers
44+
if [[ -z "$latest_ts" ]]; then
45+
ping_gatekeepers "$pr"
46+
# If the latest mention is older than $days, ping the gatekeepers again
47+
else
48+
comment_time=$(date -u -d "$latest_ts" +%s)
49+
age=$((now - comment_time))
50+
if (( age >= days_in_seconds )); then
51+
ping_gatekeepers "$pr"
52+
fi
53+
fi
54+
done

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181

8282
compat_read_exclude:
8383
name: Read compatibility testing exclude list
84-
runs-on: [Linux, build]
84+
runs-on: [Linux, aux-tasks]
8585
outputs:
8686
FILTER_6_2: ${{ steps.result.outputs.FILTER_6_2 }}
8787
FILTER_6_3: ${{ steps.result.outputs.FILTER_6_3 }}

.github/workflows/sycl-nightly.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ on:
88
permissions: read-all
99

1010
jobs:
11+
check_abi_symbols:
12+
name: Check ABI symbols tests match release branch
13+
runs-on: [Linux, build]
14+
if: github.repository == 'intel/llvm'
15+
container: ghcr.io/intel/llvm/ubuntu2404_build
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
sparse-checkout: |
20+
sycl/test/abi
21+
- run: |
22+
git fetch --depth=1 origin sycl-rel-6_3
23+
git diff --exit-code -I "^# RUN" origin/sycl-rel-6_3:sycl/test/abi/sycl_symbols_linux.dump sycl/test/abi/sycl_symbols_linux-sycl-rel-6_3.dump
24+
git diff --exit-code -I "^# RUN" origin/sycl-rel-6_3:sycl/test/abi/sycl_symbols_windows.dump sycl/test/abi/sycl_symbols_windows-sycl-rel-6_3.dump
25+
1126
ubuntu2204_build:
1227
if: github.repository == 'intel/llvm'
1328
uses: ./.github/workflows/sycl-linux-build.yml

buildbot/configure.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ def do_configure(args, passthrough_args):
8282
if libclc_enabled:
8383
llvm_enable_projects += ";libclc"
8484

85+
# DeviceRTL uses -fuse-ld=lld, so enable lld.
86+
if args.offload:
87+
llvm_enable_projects += ";lld"
88+
sycl_enabled_backends.append("offload")
89+
8590
if args.cuda:
8691
llvm_targets_to_build += ";NVPTX"
8792
libclc_targets_to_build = libclc_nvidia_target_names
@@ -210,6 +215,12 @@ def do_configure(args, passthrough_args):
210215
"-DSYCL_ENABLE_MAJOR_RELEASE_PREVIEW_LIB={}".format(sycl_preview_lib),
211216
"-DBUG_REPORT_URL=https://github.com/intel/llvm/issues",
212217
]
218+
if args.offload:
219+
cmake_cmd.extend(
220+
[
221+
"-DUR_BUILD_ADAPTER_OFFLOAD=ON",
222+
]
223+
)
213224

214225
if libclc_enabled:
215226
cmake_cmd.extend(
@@ -340,6 +351,11 @@ def main():
340351
default="AMD",
341352
help="choose hardware platform for HIP backend",
342353
)
354+
parser.add_argument(
355+
"--offload",
356+
action="store_true",
357+
help="Enable UR liboffload adapter (experimental)",
358+
)
343359
parser.add_argument(
344360
"--level_zero_adapter_version",
345361
type=str,

clang/include/clang/Basic/Attr.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ def TargetAnyX86 : TargetArch<["x86", "x86_64"]>;
494494
def TargetSPIRV : TargetArch<["spirv", "spirv32", "spirv64"]>;
495495
def TargetWebAssembly : TargetArch<["wasm32", "wasm64"]>;
496496
def TargetNVPTX : TargetArch<["nvptx", "nvptx64"]>;
497+
def TargetNativeCPU : TargetArch<["native_cpu"]>;
497498
def TargetWindows : TargetSpec {
498499
let OSes = ["Win32"];
499500
}
@@ -4530,6 +4531,11 @@ def RISCVVLSCC: DeclOrTypeAttr, TargetSpecificAttr<TargetRISCV> {
45304531
let Documentation = [RISCVVLSCCDocs];
45314532
}
45324533

4534+
def NativeCPULibclcCall : DeclOrTypeAttr, TargetSpecificAttr<TargetNativeCPU> {
4535+
let Spellings = [Clang<"libclc_call", 0>];
4536+
let Documentation = [Undocumented];
4537+
}
4538+
45334539
def Target : InheritableAttr {
45344540
let Spellings = [GCC<"target">];
45354541
let Args = [StringArgument<"featuresStr">];

clang/include/clang/Basic/TargetInfo.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,6 +1711,11 @@ class TargetInfo : public TransferrableTargetInfo,
17111711
return CC_C;
17121712
}
17131713

1714+
/// Gets the calling convention for libclc built-ins for the given target.
1715+
virtual CallingConv getLibclcCallingConv() const {
1716+
return getDefaultCallingConv();
1717+
}
1718+
17141719
/// Get the default atomic options.
17151720
AtomicOptions getAtomicOpts() const { return AtomicOpts; }
17161721

clang/include/clang/Driver/Action.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class Action {
7676
OffloadUnbundlingJobClass,
7777
OffloadWrapperJobClass,
7878
OffloadPackagerJobClass,
79+
OffloadPackagerExtractJobClass,
7980
OffloadDepsJobClass,
8081
SPIRVTranslatorJobClass,
8182
SYCLPostLinkJobClass,
@@ -719,6 +720,17 @@ class OffloadPackagerJobAction : public JobAction {
719720
}
720721
};
721722

723+
class OffloadPackagerExtractJobAction : public JobAction {
724+
void anchor() override;
725+
726+
public:
727+
OffloadPackagerExtractJobAction(ActionList &Inputs, types::ID Type);
728+
729+
static bool classof(const Action *A) {
730+
return A->getKind() == OffloadPackagerExtractJobClass;
731+
}
732+
};
733+
722734
class OffloadDepsJobAction final : public JobAction {
723735
void anchor() override;
724736

clang/include/clang/Driver/Driver.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,9 @@ bool isObjectFile(std::string FileName);
990990
/// \return True if the filename has a static archive/lib extension.
991991
bool isStaticArchiveFile(const StringRef &FileName);
992992

993+
/// \return True if the filename is an Offload Binary file.
994+
bool isOffloadBinaryFile(const StringRef &FileName);
995+
993996
/// \return True if the argument combination will end up generating remarks.
994997
bool willEmitRemarks(const llvm::opt::ArgList &Args);
995998

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5959,7 +5959,7 @@ def no_offloadlib
59595959
: Flag<["--"], "no-offloadlib">,
59605960
MarshallingInfoFlag<LangOpts<"NoGPULib">>,
59615961
Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
5962-
HelpText<"Do not link device library for CUDA/HIP device compilation">;
5962+
HelpText<"Do not link device library for CUDA/HIP/SYCL device compilation">;
59635963
def offloadlib : Flag<["--"], "offloadlib">,
59645964
Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
59655965
HelpText<"Link device libraries for GPU device compilation">;

0 commit comments

Comments
 (0)