Skip to content

Commit bed61a8

Browse files
committed
Merge branch 'sycl' into sean/usm-normalized-fix
2 parents 64f49b3 + f126cf5 commit bed61a8

File tree

176 files changed

+2169
-1121
lines changed

Some content is hidden

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

176 files changed

+2169
-1121
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ sycl/include/sycl/ext/oneapi/experimental/graph.hpp @intel/sycl-graphs-reviewers
139139
sycl/source/detail/graph_impl.cpp @intel/sycl-graphs-reviewers
140140
sycl/source/detail/graph_impl.hpp @intel/sycl-graphs-reviewers
141141
sycl/unittests/Extensions/CommandGraph/ @intel/sycl-graphs-reviewers
142-
sycl/doc/design/CommandGraph.md @intel/sycl-graphs-reviewers
143142
sycl/test-e2e/Graph @intel/sycl-graphs-reviewers
143+
sycl/doc/design/CommandGraph.md @intel/sycl-graphs-reviewers
144144
sycl/doc/extensions/**/sycl_ext_oneapi_graph.asciidoc @intel/sycl-graphs-reviewers
145+
sycl/doc/syclgraph/ @intel/sycl-graphs-reviewers
145146

146147
# syclcompat library
147148
sycl/**/syclcompat/ @intel/syclcompat-lib-reviewers

.github/workflows/sycl-docs.yml

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Generate Doxygen documentation
1+
name: Generate documentation
22

33
on:
44
schedule:
@@ -10,13 +10,21 @@ on:
1010
- '.github/workflows/sycl-docs.yml'
1111
- 'clang/docs/**'
1212
- 'sycl/doc/**'
13+
push:
14+
branches:
15+
- sycl
16+
paths:
17+
- '.github/workflows/sycl-docs.yml'
18+
- 'clang/docs/**'
19+
- 'sycl/doc/**'
1320

14-
permissions: read-all
21+
permissions:
22+
contents: read
23+
pages: write
24+
id-token: write
1525

1626
jobs:
1727
build:
18-
permissions:
19-
contents: write # for Git to git push
2028
runs-on: ubuntu-latest
2129
if: github.repository == 'intel/llvm'
2230
steps:
@@ -25,38 +33,28 @@ jobs:
2533
path: repo
2634
- name: Install deps
2735
run: |
28-
sudo apt-get install -y doxygen graphviz ssh ninja-build libhwloc-dev
36+
sudo apt-get install -y graphviz ssh ninja-build libhwloc-dev
2937
sudo pip3 install -r repo/llvm/docs/requirements.txt
3038
- name: Build Docs
3139
run: |
3240
mkdir -p $GITHUB_WORKSPACE/build
3341
cd $GITHUB_WORKSPACE/build
3442
python $GITHUB_WORKSPACE/repo/buildbot/configure.py -w $GITHUB_WORKSPACE \
3543
-s $GITHUB_WORKSPACE/repo -o $GITHUB_WORKSPACE/build -t Release --docs
36-
cmake --build . --target doxygen-sycl
37-
cmake --build . --target doxygen-clang
3844
cmake --build . --target docs-sycl-html
3945
cmake --build . --target docs-clang-html
40-
- name: Deploy
41-
if: ${{ github.event_name == 'schedule' }}
42-
env:
43-
SSH_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
44-
run: |
45-
mkdir -p ~/.ssh
46-
echo "$SSH_KEY" > ~/.ssh/id_rsa
47-
chmod 600 ~/.ssh/id_rsa
48-
eval "$(ssh-agent -s)"
49-
ssh-add -k ~/.ssh/id_rsa
50-
git clone [email protected]:intel/llvm-docs.git docs
51-
cd $GITHUB_WORKSPACE/docs
52-
git rm -rf .
46+
# Copy the generated docs to a separate directory for uploading.
47+
mkdir $GITHUB_WORKSPACE/install_docs
48+
cd $GITHUB_WORKSPACE/install_docs
49+
mkdir clang
50+
mv $GITHUB_WORKSPACE/build/tools/sycl/doc/html/* .
51+
mv $GITHUB_WORKSPACE/build/tools/clang/docs/html/* clang/
5352
touch .nojekyll
54-
yes | \cp -rf $GITHUB_WORKSPACE/build/tools/sycl/doc/html/* .
55-
mv $GITHUB_WORKSPACE/build/tools/sycl/doc/doxygen/html doxygen/
56-
mv $GITHUB_WORKSPACE/build/tools/clang/docs/html clang/
57-
mv $GITHUB_WORKSPACE/build/tools/clang/docs/doxygen/html clang_doxygen/
58-
git config --global user.name "iclsrc"
59-
git config --global user.email "[email protected]"
60-
git add .
61-
git diff-index --quiet HEAD || git commit --amend -m "Update docs" -s
62-
git push -f
53+
# Upload the generated docs as an artifact and deploy to GitHub Pages.
54+
- name: Upload artifact
55+
uses: actions/upload-pages-artifact@v3
56+
with:
57+
path: ./install_docs
58+
- name: Deploy to GitHub Pages
59+
if: ${{ github.event_name == 'push' }}
60+
uses: actions/deploy-pages@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ source project. One of the examples is
4242
Features parity between this project and downstream projects is not guaranteed.
4343

4444
Project documentation is available at:
45-
[DPC++ Documentation](https://intel.github.io/llvm-docs/).
45+
[DPC++ Documentation](https://intel.github.io/llvm/).
4646

4747
### How to use DPC++
4848

buildbot/configure.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ def do_configure(args):
116116
llvm_enable_assertions = "OFF"
117117

118118
if args.docs:
119-
llvm_enable_doxygen = "ON"
120119
llvm_enable_sphinx = "ON"
121120

122121
if args.shared_libs:

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12433,6 +12433,12 @@ def err_sycl_kernel_incorrectly_named : Error<
1243312433
"'-fsycl-unnamed-lambda' to enable unnamed kernel lambdas"
1243412434
"}0">;
1243512435

12436+
// SYCL free function kernels extension.
12437+
def note_free_function_kernel_param_type_not_fwd_declarable : Note<
12438+
"%0 is not forward declarable">;
12439+
def note_free_function_kernel_param_type_not_supported : Note<
12440+
"%0 is not yet supported as a free function kernel parameter">;
12441+
1243612442
def err_sycl_kernel_not_function_object
1243712443
: Error<"kernel parameter must be a lambda or function object">;
1243812444
def err_sycl_restrict : Error<

clang/include/clang/Driver/Options.td

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7049,9 +7049,16 @@ def fsycl_remove_unused_external_funcs : Flag<["-"], "fsycl-remove-unused-extern
70497049
def fno_sycl_remove_unused_external_funcs : Flag<["-"], "fno-sycl-remove-unused-external-funcs">,
70507050
HelpText<"Prevent removal of unused `SYCL_EXTERNAL` functions">;
70517051
def fsycl_allow_device_dependencies : Flag<["-"], "fsycl-allow-device-dependencies">,
7052-
HelpText<"Allow dependencies between device code images">;
7052+
HelpText<"Deprecated: please use -fsycl-allow-device-image-dependencies instead.">,
7053+
Flags<[Deprecated]>;
70537054
def fno_sycl_allow_device_dependencies : Flag<["-"], "fno-sycl-allow-device-dependencies">,
7054-
HelpText<"Do not allow dependencies between device code images (default)">;
7055+
HelpText<"Deprecated: please use -fno-sycl-allow-device-image-dependencies instead.">,
7056+
Flags<[Deprecated]>;
7057+
7058+
defm sycl_allow_device_image_dependencies: BoolOptionWithoutMarshalling<"f", "sycl-allow-device-image-dependencies",
7059+
PosFlag<SetTrue, [], [ClangOption], "Allow dependencies between device code images">,
7060+
NegFlag<SetFalse, [], [ClangOption], "Do not allow dependencies between device code images (default)">>;
7061+
70557062
def fsycl_dump_device_code_EQ : Joined<["-"], "fsycl-dump-device-code=">,
70567063
Flags<[NoXarchOption]>,
70577064
HelpText<"Dump device code into the user provided directory.">;

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2738,7 +2738,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
27382738
ConstWithoutErrnoOrExceptions && ErrnoOverridenToFalseWithOpt;
27392739
}
27402740
if (GenerateIntrinsics &&
2741-
!(getLangOpts().SYCLIsDevice && getTarget().getTriple().isNVPTX())) {
2741+
!(getLangOpts().SYCLIsDevice && (getTarget().getTriple().isNVPTX() ||
2742+
getTarget().getTriple().isAMDGCN()))) {
27422743
switch (BuiltinIDIfNoAsmLabel) {
27432744
case Builtin::BIacos:
27442745
case Builtin::BIacosf:

clang/lib/Driver/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5555,7 +5555,7 @@ class OffloadingActionBuilder final {
55555555
// AOT compilation.
55565556
bool SYCLDeviceLibLinked = false;
55575557
Action *NativeCPULib = nullptr;
5558-
if (IsSPIR || IsNVPTX || IsSYCLNativeCPU) {
5558+
if (IsSPIR || IsNVPTX || IsAMDGCN || IsSYCLNativeCPU) {
55595559
bool UseJitLink =
55605560
IsSPIR &&
55615561
Args.hasFlag(options::OPT_fsycl_device_lib_jit_link,

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10801,10 +10801,17 @@ static void addArgs(ArgStringList &DstArgs, const llvm::opt::ArgList &Alloc,
1080110801
}
1080210802
}
1080310803

10804-
static bool allowDeviceDependencies(const llvm::opt::ArgList &TCArgs) {
10804+
static bool allowDeviceImageDependencies(const llvm::opt::ArgList &TCArgs) {
10805+
// deprecated
1080510806
if (TCArgs.hasFlag(options::OPT_fsycl_allow_device_dependencies,
1080610807
options::OPT_fno_sycl_allow_device_dependencies, false))
1080710808
return true;
10809+
10810+
// preferred
10811+
if (TCArgs.hasFlag(options::OPT_fsycl_allow_device_image_dependencies,
10812+
options::OPT_fno_sycl_allow_device_image_dependencies, false))
10813+
return true;
10814+
1080810815
return false;
1080910816
}
1081010817

@@ -10835,7 +10842,7 @@ static void getNonTripleBasedSYCLPostLinkOpts(const ToolChain &TC,
1083510842
options::OPT_fsycl_esimd_force_stateless_mem, false))
1083610843
addArgs(PostLinkArgs, TCArgs, {"-lower-esimd-force-stateless-mem=false"});
1083710844

10838-
if (allowDeviceDependencies(TCArgs))
10845+
if (allowDeviceImageDependencies(TCArgs))
1083910846
addArgs(PostLinkArgs, TCArgs, {"-allow-device-image-dependencies"});
1084010847
}
1084110848

@@ -10853,7 +10860,7 @@ static bool shouldEmitOnlyKernelsAsEntryPoints(const ToolChain &TC,
1085310860
return true;
1085410861
// When supporting dynamic linking, non-kernels in a device image can be
1085510862
// called.
10856-
if (allowDeviceDependencies(TCArgs))
10863+
if (allowDeviceImageDependencies(TCArgs))
1085710864
return false;
1085810865
if (Triple.isNVPTX() || Triple.isAMDGPU())
1085910866
return false;

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ static bool selectBfloatLibs(const llvm::Triple &Triple, const Compilation &C,
165165

166166
// spir64 target is actually JIT compilation, so we defer selection of
167167
// bfloat16 libraries to runtime. For AOT we need libraries, but skip
168-
// for Nvidia.
169-
NeedLibs =
170-
Triple.getSubArch() != llvm::Triple::NoSubArch && !Triple.isNVPTX();
168+
// for Nvidia and AMD.
169+
NeedLibs = Triple.getSubArch() != llvm::Triple::NoSubArch &&
170+
!Triple.isNVPTX() && !Triple.isAMDGCN();
171171
UseNative = false;
172172
if (NeedLibs && Triple.getSubArch() == llvm::Triple::SPIRSubArch_gen &&
173173
C.hasOffloadToolChain<Action::OFK_SYCL>()) {
@@ -212,9 +212,9 @@ SYCL::getDeviceLibraries(const Compilation &C, const llvm::Triple &TargetTriple,
212212
SmallVector<std::string, 8> LibraryList;
213213
const llvm::opt::ArgList &Args = C.getArgs();
214214

215-
// For NVPTX we only use one single bitcode library and ignore
215+
// For NVPTX and AMDGCN we only use one single bitcode library and ignore
216216
// manually specified SYCL device libraries.
217-
bool IgnoreSingleLibs = TargetTriple.isNVPTX();
217+
bool IgnoreSingleLibs = TargetTriple.isNVPTX() || TargetTriple.isAMDGCN();
218218

219219
struct DeviceLibOptInfo {
220220
StringRef DeviceLibName;
@@ -278,6 +278,9 @@ SYCL::getDeviceLibraries(const Compilation &C, const llvm::Triple &TargetTriple,
278278
if (TargetTriple.isNVPTX() && IgnoreSingleLibs)
279279
LibraryList.push_back(Args.MakeArgString("devicelib--cuda.bc"));
280280

281+
if (TargetTriple.isAMDGCN() && IgnoreSingleLibs)
282+
LibraryList.push_back(Args.MakeArgString("devicelib--amd.bc"));
283+
281284
if (IgnoreSingleLibs)
282285
return LibraryList;
283286

@@ -1812,22 +1815,18 @@ void SYCLToolChain::AddSYCLIncludeArgs(const clang::driver::Driver &Driver,
18121815
const ArgList &DriverArgs,
18131816
ArgStringList &CC1Args) {
18141817
// Add the SYCL header search locations in the specified order.
1815-
// ../include/sycl
18161818
// ../include/sycl/stl_wrappers
18171819
// ../include
18181820
SmallString<128> IncludePath(Driver.Dir);
18191821
llvm::sys::path::append(IncludePath, "..");
18201822
llvm::sys::path::append(IncludePath, "include");
1821-
SmallString<128> SYCLPath(IncludePath);
1822-
llvm::sys::path::append(SYCLPath, "sycl");
18231823
// This is used to provide our wrappers around STL headers that provide
18241824
// additional functions/template specializations when the user includes those
18251825
// STL headers in their programs (e.g., <complex>).
1826-
SmallString<128> STLWrappersPath(SYCLPath);
1826+
SmallString<128> STLWrappersPath(IncludePath);
1827+
llvm::sys::path::append(STLWrappersPath, "sycl");
18271828
llvm::sys::path::append(STLWrappersPath, "stl_wrappers");
18281829
CC1Args.push_back("-internal-isystem");
1829-
CC1Args.push_back(DriverArgs.MakeArgString(SYCLPath));
1830-
CC1Args.push_back("-internal-isystem");
18311830
CC1Args.push_back(DriverArgs.MakeArgString(STLWrappersPath));
18321831
CC1Args.push_back("-internal-isystem");
18331832
CC1Args.push_back(DriverArgs.MakeArgString(IncludePath));

0 commit comments

Comments
 (0)