Skip to content

Commit 1e7ca18

Browse files
Fix comments.
1 parent c4bf648 commit 1e7ca18

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

clang/lib/Driver/Driver.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,6 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
11921192
// of -fsycl*target options passed
11931193
Arg *SYCLTargetsValues = SYCLTargets;
11941194
if (SYCLTargetsValues) {
1195-
11961195
if (SYCLTargetsValues->getNumValues()) {
11971196

11981197
// Multiple targets are currently not supported when using
@@ -1301,10 +1300,10 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
13011300
else if (HasValidSYCLRuntime &&
13021301
C.getInputArgs().hasArg(options::OPT_offload_arch_EQ) && !IsHIP &&
13031302
!IsCuda) {
1304-
// SYCL offloading to AOT Targets with ``--offload-arch``
1305-
// is currently enabled only with ``--offload-new-driver`` option.
1306-
// Emit a diagnostic if ``--offload-arch`` is invoked without
1307-
// ``--offload-new driver`` option.
1303+
// SYCL offloading to AOT Targets with '--offload-arch'
1304+
// is currently enabled only with '--offload-new-driver' option.
1305+
// Emit a diagnostic if '--offload-arch' is invoked without
1306+
// '--offload-new driver' option.
13081307
if (!C.getInputArgs().hasFlag(options::OPT_offload_new_driver,
13091308
options::OPT_no_offload_new_driver, false)) {
13101309
Diag(clang::diag::err_drv_sycl_offload_arch_new_driver);
@@ -1351,11 +1350,11 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
13511350
Arch);
13521351
} else if (IsSYCLSupportedIntelGPUArch(StringToOffloadArchSYCL(Arch))) {
13531352
StringRef IntelGPUArch;
1354-
// For Intel Graphics AOT target, valid values for ``--offload-arch``
1353+
// For Intel Graphics AOT target, valid values for '--offload-arch'
13551354
// are mapped to valid device names accepted by OCLOC (the Intel GPU AOT
1356-
// compiler) via the ``-device`` option. The mapIntelGPUArchName
1357-
// function maps the accepted values for `--offload-arch` to enable SYCL
1358-
// offloading to Intel GPUs and the corresponding `-device` value passed
1355+
// compiler) via the '-device' option. The mapIntelGPUArchName
1356+
// function maps the accepted values for '--offload-arch' to enable SYCL
1357+
// offloading to Intel GPUs and the corresponding '-device' value passed
13591358
// to OCLOC.
13601359
IntelGPUArch = mapIntelGPUArchName(Arch).data();
13611360
DerivedArchs[MakeSYCLDeviceTriple("spir64_gen").getTriple()].insert(

clang/lib/Driver/ToolChains/SYCL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ IsSYCLSupportedNVidiaGPUArch(SYCLSupportedOffloadArchs Arch) {
150150
// Check if the given Arch value is a valid SYCL supported Intel CPU.
151151
static inline bool IsSYCLSupportedIntelCPUArch(SYCLSupportedOffloadArchs Arch) {
152152
return Arch >= SYCLSupportedOffloadArchs::SKYLAKEAVX512 &&
153-
Arch < SYCLSupportedOffloadArchs::BDW;
153+
Arch <= SYCLSupportedOffloadArchs::GRANITERAPIDS;
154154
}
155155

156156
// Check if the given Arch value is a valid SYCL supported Intel GPU.

0 commit comments

Comments
 (0)