Skip to content

Commit 37e23f2

Browse files
committed
sync to latest sycl branch
Signed-off-by: jinge90 <[email protected]>
2 parents 217daf2 + 906a9a3 commit 37e23f2

File tree

7 files changed

+130
-228
lines changed

7 files changed

+130
-228
lines changed

sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ jit_compiler::compileDeviceCode(InMemoryFile SourceFile,
175175
DerivedArgList DAL{UserArgList};
176176
const auto &OptTable = getDriverOptTable();
177177
DAL.AddFlagArg(nullptr, OptTable.getOption(OPT_fsycl_device_only));
178+
DAL.AddFlagArg(nullptr,
179+
OptTable.getOption(OPT_fno_sycl_dead_args_optimization));
178180
DAL.AddJoinedArg(
179181
nullptr, OptTable.getOption(OPT_resource_dir_EQ),
180182
(DPCPPRoot + "/lib/clang/" + Twine(CLANG_VERSION_MAJOR)).str());
@@ -518,5 +520,11 @@ jit_compiler::parseUserArgs(View<const char *> UserArgs) {
518520
"Runtime compilation of ESIMD kernels is not yet supported");
519521
}
520522

523+
if (AL.hasFlag(OPT_fsycl_dead_args_optimization,
524+
OPT_fno_sycl_dead_args_optimization, false)) {
525+
return createStringError(
526+
"Dead argument optimization must be disabled for runtime compilation");
527+
}
528+
521529
return std::move(AL);
522530
}

sycl/include/sycl/aliases.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,11 @@ using cl_double = double;
140140
} // namespace opencl
141141

142142
// Vector aliases are different between SYCL 1.2.1 and SYCL 2020
143-
#if SYCL_LANGUAGE_VERSION >= 202001
144143
__SYCL_2020_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(2)
145144
__SYCL_2020_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(3)
146145
__SYCL_2020_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(4)
147146
__SYCL_2020_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(8)
148147
__SYCL_2020_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(16)
149-
#else
150-
__SYCL_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(2)
151-
__SYCL_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(3)
152-
__SYCL_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(4)
153-
__SYCL_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(8)
154-
__SYCL_MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(16)
155-
#endif
156148
} // namespace _V1
157149
} // namespace sycl
158150

sycl/include/sycl/handler.hpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,7 @@
6767
// 41(!!!) includes of SYCL headers + 10 includes of standard headers.
6868
// 3300+ lines of code
6969

70-
// SYCL_LANGUAGE_VERSION is 4 digit year followed by 2 digit revision
71-
#if !SYCL_LANGUAGE_VERSION || SYCL_LANGUAGE_VERSION < 202001
72-
#define __SYCL_NONCONST_FUNCTOR__
73-
#endif
74-
75-
// replace _KERNELFUNCPARAM(KernelFunc) with KernelType KernelFunc
76-
// or const KernelType &KernelFunc
77-
#ifdef __SYCL_NONCONST_FUNCTOR__
78-
#define _KERNELFUNCPARAMTYPE KernelType
79-
#else
8070
#define _KERNELFUNCPARAMTYPE const KernelType &
81-
#endif
8271
#define _KERNELFUNCPARAM(a) _KERNELFUNCPARAMTYPE a
8372

8473
#if defined(__SYCL_UNNAMED_LAMBDA__)

sycl/include/sycl/queue.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,8 @@
5656
// these macros are #undef immediately.
5757
// replace _KERNELFUNCPARAM(KernelFunc) with KernelType KernelFunc
5858
// or const KernelType &KernelFunc
59-
#ifdef __SYCL_NONCONST_FUNCTOR__
60-
#define _KERNELFUNCPARAM(a) KernelType a
61-
#else
59+
6260
#define _KERNELFUNCPARAM(a) const KernelType &a
63-
#endif
6461

6562
namespace sycl {
6663
inline namespace _V1 {

0 commit comments

Comments
 (0)