Skip to content

[SYCL] Transition from ONEAPI/INTEL to ext::oneapi/intel namespaces #4014

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
47bd5b2
[SYCL] Transition from ONEAPI/INTEL to oneapi/intel namspaces
dm-vodopyanov Jun 28, 2021
41271d4
Merge remote-tracking branch 'upstream/sycl' into private/dvodopya/IN…
dm-vodopyanov Jun 29, 2021
0a90818
Fix clang-format
dm-vodopyanov Jun 29, 2021
2b93e11
Fix more clang-format
dm-vodopyanov Jun 29, 2021
308b11d
Move folders ONEAPI->oneapi, INTEL->intel
dm-vodopyanov Jun 29, 2021
62827b0
sycl::oneapi -> sycl::ext::oneapi
dm-vodopyanov Jul 8, 2021
3a1e6d9
sycl::intel -> sycl::ext::intel
dm-vodopyanov Jul 8, 2021
7b537cf
Merge commit '33bc8adfe4ec60179df8cdae8ed7de00e7e316e0' into private/…
dm-vodopyanov Jul 8, 2021
2978e18
Merge commit 'b4c322a89611e5802dbe3ea9bcd8f37ba9c19b65' into private/…
dm-vodopyanov Jul 8, 2021
3ae9c72
Merge commit 'd5958ebf84dba5d4ca5a254798c56f65e59dc8c1' into private/…
dm-vodopyanov Jul 8, 2021
f3f5c04
Merge commit 'd1d1eb2e795bce2c4ac59a01514158a6d56d89aa' into private/…
dm-vodopyanov Jul 8, 2021
cf11707
Merge commit '544fb7c8501a55a3088f036c1fb9cd254afaadc9' into private/…
dm-vodopyanov Jul 8, 2021
9b400a3
Merge commit '5fca77beee01016d8348839d8e6e5707f030ac42' into private/…
dm-vodopyanov Jul 8, 2021
9c17970
Merge commit '08330525c273b4fc502e5edbc94ee2cdaa598b5b' into private/…
dm-vodopyanov Jul 8, 2021
4bd20be
Merge commit '4a6d21fccf2aae4e8f005f4b3f348ee1772ade89' into private/…
dm-vodopyanov Jul 8, 2021
a78aba1
Merge commit '8fe7dd9a4e06f765f8831ad7322c1ed8b9ddffdd' into private/…
dm-vodopyanov Jul 8, 2021
17c62ac
Merge commit 'db20bab31e8ca5abd3d1be273f3c56b389334cf2' into private/…
dm-vodopyanov Jul 8, 2021
41ea40b
Merge commit '807fdaedfd725a3a8b2d62d571239a5df8353a12' into private/…
dm-vodopyanov Jul 8, 2021
3157916
Merge commit '14cdb5a4d385545fbff24e6c3d3172b14be4b663' into private/…
dm-vodopyanov Jul 8, 2021
8827424
Merge commit 'cf1e717a8fd157c2e13baec7056346668f789743' into private/…
dm-vodopyanov Jul 8, 2021
b76e35d
Merge commit '4cd401661cdf37dc92cd7636e7cc19eb6c404ca9' into private/…
dm-vodopyanov Jul 8, 2021
f951546
Merge commit 'ace4c73338270b465d6233a8f82296cfc40dbe85' into private/…
dm-vodopyanov Jul 8, 2021
d3b3a16
Merge commit '25aee2874b822c52cd756c18ce5b4e18068774a0' into private/…
dm-vodopyanov Jul 8, 2021
d8832c2
Merge commit '69a68a6dc16a537a1e40ff3cdd969b45b5e64037' into private/…
dm-vodopyanov Jul 8, 2021
469963d
Merge commit '15a52e15be856f54cc390db190c6a3fae44758cf' into private/…
dm-vodopyanov Jul 8, 2021
1f1b446
Merge commit '9d8e94d0a333853160d2104d8ce2e44b64d14caa' into private/…
dm-vodopyanov Jul 8, 2021
b0b032d
Merge commit '4236bbba4c562a1355e75fa6d237b7c6b15a3193' into private/…
dm-vodopyanov Jul 8, 2021
58702fe
Merge commit '1dea75712d6057df29430ebd666e0efa25f635e0' into private/…
dm-vodopyanov Jul 8, 2021
7ff8cb0
Merge commit '06e4ebc73bc9093d2a2b327598833a787b51d2a0' into private/…
dm-vodopyanov Jul 8, 2021
4f161d7
Merge commit '98ab6d7807e5f0bf26e64e9cb7bb4d1f1b8ce1ab' into private/…
dm-vodopyanov Jul 8, 2021
02ef921
Merge commit '0e3b6aa4c4aad4ca8e2468456f0e907d37012099' into private/…
dm-vodopyanov Jul 8, 2021
b359f9c
Merge commit 'd8a1f33a83b94fd2eda1f63c8e3e1575d3ad7ae3' into private/…
dm-vodopyanov Jul 8, 2021
27b93cc
Merge commit 'c69a3115cfef390edabf60a1a7b0ae3321dafd19' into private/…
dm-vodopyanov Jul 8, 2021
4b36995
Merge commit '7fc8aa0957e69cb4cc54a1fcd48f7e03d635bd10' into private/…
dm-vodopyanov Jul 8, 2021
d50641d
Merge commit '0debfb1498e820c525c1325eb7294d10d6081cbe' into private/…
dm-vodopyanov Jul 8, 2021
f843f8a
Merge commit 'ebb9fe8aa9e2ac796b3e5b9bc6ad45eb794003cb' into private/…
dm-vodopyanov Jul 8, 2021
5b2de9b
Merge commit '55a1b088c6761f922744b7b0f1190f9f1222bcef' into private/…
dm-vodopyanov Jul 8, 2021
74ae89e
Merge commit '881724f349690bf1b338cfda8827e674e57dbe06' into private/…
dm-vodopyanov Jul 8, 2021
c53fb77
Merge commit '000cc82d9f9befb1936682d967f9dfba28c61dd1' into private/…
dm-vodopyanov Jul 8, 2021
bda01a5
Merge commit '76051ccf476b463ee04bb2ab249e9b98d6e5e204' into private/…
dm-vodopyanov Jul 8, 2021
87e3b96
Merge commit '7fe72dba8c5912f87eed98d585230bce3f9076d6' into private/…
dm-vodopyanov Jul 8, 2021
09f4402
Merge commit '97ec12554e5f39f5bf24a8b290a51595320abd49' into private/…
dm-vodopyanov Jul 8, 2021
6ca7b43
Merge commit 'dcd595472aae49c9f84efaa2bc16d7834993fa04' into private/…
dm-vodopyanov Jul 8, 2021
30b278f
Merge remote-tracking branch 'upstream/sycl' into private/dvodopya/IN…
dm-vodopyanov Jul 8, 2021
d3773df
Move headers: CL/sycl/oneapi[intel] -> sycl/ext/oneapi[intel]
dm-vodopyanov Jul 8, 2021
65e2521
Fix missing hits in clang-format
dm-vodopyanov Jul 8, 2021
2662c70
Fix one more missing clang-format
dm-vodopyanov Jul 8, 2021
c1789d8
Update the remaining files in llvm/
dm-vodopyanov Jul 8, 2021
8ad0e77
Fix clang-format
dm-vodopyanov Jul 8, 2021
671b371
Fix check-sycl tests
dm-vodopyanov Jul 9, 2021
2e9817d
Return CL/sycl/ONEAPI headers and add deprecation msg to them
dm-vodopyanov Jul 9, 2021
ad5148a
Return CL/sycl/INTEL headers and add deprecation msg to them
dm-vodopyanov Jul 9, 2021
5f8dfa5
Apply CR comments
dm-vodopyanov Jul 9, 2021
df57f05
Fix syntax errors for deprecation msgs in headers
dm-vodopyanov Jul 9, 2021
c379ebd
Add missing deprecated intel:: namespace
dm-vodopyanov Jul 12, 2021
c22e585
Revert extra clang-format changes
dm-vodopyanov Jul 12, 2021
8fd3b2c
Change warning messages for deprecated headers
dm-vodopyanov Jul 12, 2021
b0f6675
sycl::ext::name -> sycl::NAME for tests
dm-vodopyanov Jul 12, 2021
fbdfb5e
Merge remote-tracking branch 'upstream/sycl' into private/dvodopya/IN…
dm-vodopyanov Jul 12, 2021
33cd8ca
Fix some bugs in online_compiler and update move recently merged code…
dm-vodopyanov Jul 14, 2021
bec8389
Apply CR comments
dm-vodopyanov Jul 14, 2021
2611c49
Update docs and 1 deprecation warning
dm-vodopyanov Jul 14, 2021
8a6c9a2
Update include paths in docs
dm-vodopyanov Jul 14, 2021
7223281
Revert unnecessary changes in ReleaseNotes.md
dm-vodopyanov Jul 15, 2021
74a8862
Merge remote-tracking branch 'upstream/sycl' into private/dvodopya/IN…
dm-vodopyanov Jul 16, 2021
055b373
Fix clang-format after resolving merge conflict
dm-vodopyanov Jul 16, 2021
0015608
Apply esimd comments
dm-vodopyanov Jul 16, 2021
4425323
Fix the location of moved header file
dm-vodopyanov Jul 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ sycl/doc/extensions/ @intel/dpcpp-specification-reviewers

# Sub-groups
sycl/include/CL/sycl/detail/spirv.hpp @Pennycook @AlexeySachkov
sycl/include/CL/sycl/intel/group_algorithm.hpp @Pennycook @AlexeySachkov
sycl/include/CL/sycl/intel/sub_group.hpp @Pennycook @AlexeySachkov
sycl/include/CL/sycl/intel/sub_group_host.hpp @Pennycook @AlexeySachkov
sycl/include/sycl/ext/intel/group_algorithm.hpp @Pennycook @AlexeySachkov
sycl/include/sycl/ext/intel/sub_group.hpp @Pennycook @AlexeySachkov
sycl/include/sycl/ext/intel/sub_group_host.hpp @Pennycook @AlexeySachkov

# PI API
sycl/include/CL/sycl/detail/pi.def @smaslov-intel
Expand All @@ -53,17 +53,17 @@ sycl/source/detail/stream_impl.cpp @againull
sycl/source/stream.cpp @againull

# FPGA extensions
sycl/include/CL/sycl/intel/fpga_device_selector.hpp @MrSidims
sycl/include/CL/sycl/intel/fpga_extensions.hpp @MrSidims
sycl/include/CL/sycl/intel/fpga_reg.hpp @MrSidims
sycl/include/CL/sycl/intel/pipes.hpp @MrSidims
sycl/include/sycl/ext/intel/fpga_device_selector.hpp @MrSidims
sycl/include/sycl/ext/intel/fpga_extensions.hpp @MrSidims
sycl/include/sycl/ext/intel/fpga_reg.hpp @MrSidims
sycl/include/sycl/ext/intel/pipes.hpp @MrSidims
sycl/include/CL/sycl/pipes.hpp @MrSidims

# Reduction extension
sycl/include/CL/sycl/intel/reduction.hpp @v-klochkov
sycl/include/sycl/ext/intel/reduction.hpp @v-klochkov

# Function pointers
sycl/include/CL/sycl/intel/function_pointer.hpp @AlexeySachkov
sycl/include/sycl/ext/intel/function_pointer.hpp @AlexeySachkov
sycl/source/function_pointer.cpp @AlexeySachkov

# Half Type
Expand Down
53 changes: 45 additions & 8 deletions clang/lib/Sema/SemaSYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5061,14 +5061,23 @@ bool Util::isSyclHalfType(QualType Ty) {
}

bool Util::isSyclSpecConstantType(QualType Ty) {
std::array<DeclContextDesc, 5> Scopes = {
std::array<DeclContextDesc, 6> Scopes = {
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "cl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "sycl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "ext"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "oneapi"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "experimental"),
Util::MakeDeclContextDesc(Decl::Kind::ClassTemplateSpecialization,
"spec_constant")};
std::array<DeclContextDesc, 5> ScopesDeprecated = {
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "cl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "sycl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "ONEAPI"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "experimental"),
Util::MakeDeclContextDesc(Decl::Kind::ClassTemplateSpecialization,
"spec_constant")};
return matchQualifiedTypeName(Ty, Scopes);
return matchQualifiedTypeName(Ty, Scopes) ||
matchQualifiedTypeName(Ty, ScopesDeprecated);
}

bool Util::isSyclSpecIdType(QualType Ty) {
Expand All @@ -5089,27 +5098,47 @@ bool Util::isSyclKernelHandlerType(QualType Ty) {
}

bool Util::isSyclAccessorNoAliasPropertyType(QualType Ty) {
std::array<DeclContextDesc, 6> Scopes = {
std::array<DeclContextDesc, 7> Scopes = {
Util::DeclContextDesc{Decl::Kind::Namespace, "cl"},
Util::DeclContextDesc{Decl::Kind::Namespace, "sycl"},
Util::DeclContextDesc{Decl::Kind::Namespace, "ext"},
Util::DeclContextDesc{Decl::Kind::Namespace, "oneapi"},
Util::DeclContextDesc{Decl::Kind::Namespace, "property"},
Util::DeclContextDesc{Decl::Kind::CXXRecord, "no_alias"},
Util::DeclContextDesc{Decl::Kind::ClassTemplateSpecialization,
"instance"}};
std::array<DeclContextDesc, 6> ScopesDeprecated = {
Util::DeclContextDesc{Decl::Kind::Namespace, "cl"},
Util::DeclContextDesc{Decl::Kind::Namespace, "sycl"},
Util::DeclContextDesc{Decl::Kind::Namespace, "ONEAPI"},
Util::DeclContextDesc{Decl::Kind::Namespace, "property"},
Util::DeclContextDesc{Decl::Kind::CXXRecord, "no_alias"},
Util::DeclContextDesc{Decl::Kind::ClassTemplateSpecialization,
"instance"}};
return matchQualifiedTypeName(Ty, Scopes);
return matchQualifiedTypeName(Ty, Scopes) ||
matchQualifiedTypeName(Ty, ScopesDeprecated);
}

bool Util::isSyclBufferLocationType(QualType Ty) {
std::array<DeclContextDesc, 6> Scopes = {
std::array<DeclContextDesc, 7> Scopes = {
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "cl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "sycl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "ext"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "intel"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "property"),
Util::MakeDeclContextDesc(Decl::Kind::CXXRecord, "buffer_location"),
Util::MakeDeclContextDesc(Decl::Kind::ClassTemplateSpecialization,
"instance")};
std::array<DeclContextDesc, 6> ScopesDeprecated = {
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "cl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "sycl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "INTEL"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "property"),
Util::MakeDeclContextDesc(Decl::Kind::CXXRecord, "buffer_location"),
Util::MakeDeclContextDesc(Decl::Kind::ClassTemplateSpecialization,
"instance")};
return matchQualifiedTypeName(Ty, Scopes);
return matchQualifiedTypeName(Ty, Scopes) ||
matchQualifiedTypeName(Ty, ScopesDeprecated);
}

bool Util::isSyclType(QualType Ty, StringRef Name, bool Tmpl) {
Expand Down Expand Up @@ -5138,13 +5167,21 @@ bool Util::isSyclFunction(const FunctionDecl *FD, StringRef Name) {
}

bool Util::isAccessorPropertyListType(QualType Ty) {
std::array<DeclContextDesc, 4> Scopes = {
std::array<DeclContextDesc, 5> Scopes = {
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "cl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "sycl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "ext"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "oneapi"),
Util::MakeDeclContextDesc(Decl::Kind::ClassTemplateSpecialization,
"accessor_property_list")};
std::array<DeclContextDesc, 4> ScopesDeprecated = {
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "cl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "sycl"),
Util::MakeDeclContextDesc(Decl::Kind::Namespace, "ONEAPI"),
Util::MakeDeclContextDesc(Decl::Kind::ClassTemplateSpecialization,
"accessor_property_list")};
return matchQualifiedTypeName(Ty, Scopes);
return matchQualifiedTypeName(Ty, Scopes) ||
matchQualifiedTypeName(Ty, ScopesDeprecated);
}

bool Util::matchContext(const DeclContext *Ctx,
Expand Down
26 changes: 17 additions & 9 deletions clang/test/CodeGenSYCL/Inputs/sycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,28 +94,34 @@ class property_list {
bool operator!=(const property_list &rhs) const { return false; }
};

namespace INTEL {
namespace ext {
namespace intel {
namespace property {
// Compile time known accessor property
struct buffer_location {
template <int> class instance {};
};
} // namespace property
} // namespace INTEL
} // namespace intel
} // namespace ext

namespace ONEAPI {
namespace ext {
namespace oneapi {
namespace property {
// Compile time known accessor property
struct no_alias {
template <bool> class instance {};
};
} // namespace property
} // namespace ONEAPI
} // namespace oneapi
} // namespace ext

namespace ONEAPI {
namespace ext {
namespace oneapi {
template <typename... properties>
class accessor_property_list {};
} // namespace ONEAPI
} // namespace oneapi
} // namespace ext

template <int dim>
struct id {
Expand Down Expand Up @@ -166,7 +172,7 @@ struct _ImplT {
template <typename dataT, int dimensions, access::mode accessmode,
access::target accessTarget = access::target::global_buffer,
access::placeholder isPlaceholder = access::placeholder::false_t,
typename propertyListT = ONEAPI::accessor_property_list<>>
typename propertyListT = ext::oneapi::accessor_property_list<>>
class accessor {

public:
Expand Down Expand Up @@ -286,7 +292,8 @@ struct get_kernel_name_t<auto_name, Type> {
using name = Type;
};

namespace ONEAPI {
namespace ext {
namespace oneapi {
namespace experimental {
template <typename T, typename ID = T>
class spec_constant {
Expand All @@ -302,7 +309,8 @@ class spec_constant {
}
};
} // namespace experimental
} // namespace ONEAPI
} // namespace oneapi
} // namespace ext

class kernel_handler {
void __init_specialization_constants_buffer(char *specialization_constants_buffer) {}
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGenSYCL/accessor_inheritance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ int main() {
// Check accessors initialization
// CHECK: [[ACC_FIELD:%[a-zA-Z0-9_]+]] = getelementptr inbounds %struct{{.*}}Base, %struct{{.*}}Base addrspace(4)* [[BITCAST]], i32 0, i32 2
// Default constructor call
// CHECK: call spir_func void @_ZN2cl4sycl8accessorIcLi1ELNS0_6access4modeE1024ELNS2_6targetE2014ELNS2_11placeholderE0ENS0_6ONEAPI22accessor_property_listIJEEEEC1Ev(%"class{{.*}}cl::sycl::accessor" addrspace(4)* {{[^,]*}} [[ACC_FIELD]])
// CHECK: call spir_func void @_ZN2cl4sycl8accessorIcLi1ELNS0_6access4modeE1024ELNS2_6targetE2014ELNS2_11placeholderE0ENS0_3ext6oneapi22accessor_property_listIJEEEEC1Ev(%"class{{.*}}cl::sycl::accessor" addrspace(4)* {{[^,]*}} [[ACC_FIELD]])
// CHECK: [[BITCAST1:%[a-zA-Z0-9_]+]] = bitcast %struct{{.*}}Captured addrspace(4)* [[GEP]] to i8 addrspace(4)*
// CHECK: [[GEP1:%[a-zA-Z0-9_]+]] = getelementptr inbounds i8, i8 addrspace(4)* [[BITCAST1]], i64 20
// CHECK: [[BITCAST2:%[a-zA-Z0-9_]+]] = bitcast i8 addrspace(4)* [[GEP1]] to %"class{{.*}}cl::sycl::accessor" addrspace(4)*
// Default constructor call
// CHECK: call spir_func void @_ZN2cl4sycl8accessorIcLi1ELNS0_6access4modeE1024ELNS2_6targetE2014ELNS2_11placeholderE0ENS0_6ONEAPI22accessor_property_listIJEEEEC2Ev(%"class{{.*}}cl::sycl::accessor" addrspace(4)* {{[^,]*}} [[BITCAST2]])
// CHECK: call spir_func void @_ZN2cl4sycl8accessorIcLi1ELNS0_6access4modeE1024ELNS2_6targetE2014ELNS2_11placeholderE0ENS0_3ext6oneapi22accessor_property_listIJEEEEC2Ev(%"class{{.*}}cl::sycl::accessor" addrspace(4)* {{[^,]*}} [[BITCAST2]])

// CHECK C field initialization
// CHECK: [[FIELD_C:%[a-zA-Z0-9_]+]] = getelementptr inbounds %struct{{.*}}Captured, %struct{{.*}}Captured addrspace(4)* [[GEP]], i32 0, i32 2
Expand Down
8 changes: 4 additions & 4 deletions clang/test/CodeGenSYCL/accessor_no_alias_property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ int main() {
cl::sycl::accessor<int, 1, cl::sycl::access::mode::read_write,
cl::sycl::access::target::global_buffer,
cl::sycl::access::placeholder::false_t,
cl::sycl::ONEAPI::accessor_property_list<
cl::sycl::ONEAPI::property::no_alias::instance<true>>>
cl::sycl::ext::oneapi::accessor_property_list<
cl::sycl::ext::oneapi::property::no_alias::instance<true>>>
accessorA;

cl::sycl::accessor<int, 1, cl::sycl::access::mode::read_write,
cl::sycl::access::target::global_buffer,
cl::sycl::access::placeholder::false_t,
cl::sycl::ONEAPI::accessor_property_list<
cl::sycl::INTEL::property::buffer_location::instance<1>>>
cl::sycl::ext::oneapi::accessor_property_list<
cl::sycl::ext::intel::property::buffer_location::instance<1>>>
accessorB;

cl::sycl::kernel_single_task<class kernel_function1>(
Expand Down
12 changes: 6 additions & 6 deletions clang/test/CodeGenSYCL/buffer_location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ struct Base {
cl::sycl::accessor<char, 1, cl::sycl::access::mode::read,
cl::sycl::access::target::global_buffer,
cl::sycl::access::placeholder::false_t,
cl::sycl::ONEAPI::accessor_property_list<
cl::sycl::INTEL::property::buffer_location::instance<2>>>
cl::sycl::ext::oneapi::accessor_property_list<
cl::sycl::ext::intel::property::buffer_location::instance<2>>>
AccField;
};

struct Captured : Base,
cl::sycl::accessor<char, 1, cl::sycl::access::mode::read,
cl::sycl::access::target::global_buffer,
cl::sycl::access::placeholder::false_t,
cl::sycl::ONEAPI::accessor_property_list<
cl::sycl::INTEL::property::buffer_location::instance<2>>> {
cl::sycl::ext::oneapi::accessor_property_list<
cl::sycl::ext::intel::property::buffer_location::instance<2>>> {
int C;
};

Expand All @@ -29,8 +29,8 @@ int main() {
cl::sycl::accessor<int, 1, cl::sycl::access::mode::read_write,
cl::sycl::access::target::global_buffer,
cl::sycl::access::placeholder::false_t,
cl::sycl::ONEAPI::accessor_property_list<
cl::sycl::INTEL::property::buffer_location::instance<3>>>
cl::sycl::ext::oneapi::accessor_property_list<
cl::sycl::ext::intel::property::buffer_location::instance<3>>>
accessorA;
cl::sycl::kernel_single_task<class kernel_function>(
[=]() {
Expand Down
24 changes: 12 additions & 12 deletions clang/test/CodeGenSYCL/int_header_spec_const.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ class MySpecConstantWithinANamespace;

int main() {
// Create specialization constants.
cl::sycl::ONEAPI::experimental::spec_constant<bool, MyBoolConst> i1(false);
cl::sycl::ONEAPI::experimental::spec_constant<char, MyInt8Const> i8(0);
cl::sycl::ONEAPI::experimental::spec_constant<unsigned char, MyUInt8Const> ui8(0);
cl::sycl::ONEAPI::experimental::spec_constant<short, MyInt16Const> i16(0);
cl::sycl::ONEAPI::experimental::spec_constant<unsigned short, MyUInt16Const> ui16(0);
cl::sycl::ONEAPI::experimental::spec_constant<int, MyInt32Const> i32(0);
cl::sycl::ext::oneapi::experimental::spec_constant<bool, MyBoolConst> i1(false);
cl::sycl::ext::oneapi::experimental::spec_constant<char, MyInt8Const> i8(0);
cl::sycl::ext::oneapi::experimental::spec_constant<unsigned char, MyUInt8Const> ui8(0);
cl::sycl::ext::oneapi::experimental::spec_constant<short, MyInt16Const> i16(0);
cl::sycl::ext::oneapi::experimental::spec_constant<unsigned short, MyUInt16Const> ui16(0);
cl::sycl::ext::oneapi::experimental::spec_constant<int, MyInt32Const> i32(0);
// Constant used twice, but there must be single entry in the int header,
// otherwise compilation error would be issued.
cl::sycl::ONEAPI::experimental::spec_constant<int, MyInt32Const> i32_1(0);
cl::sycl::ONEAPI::experimental::spec_constant<unsigned int, MyUInt32Const> ui32(0);
cl::sycl::ONEAPI::experimental::spec_constant<float, MyFloatConst> f32(0);
cl::sycl::ONEAPI::experimental::spec_constant<double, MyDoubleConst> f64(0);
cl::sycl::ext::oneapi::experimental::spec_constant<int, MyInt32Const> i32_1(0);
cl::sycl::ext::oneapi::experimental::spec_constant<unsigned int, MyUInt32Const> ui32(0);
cl::sycl::ext::oneapi::experimental::spec_constant<float, MyFloatConst> f32(0);
cl::sycl::ext::oneapi::experimental::spec_constant<double, MyDoubleConst> f64(0);
// Kernel name can be used as a spec constant name
cl::sycl::ONEAPI::experimental::spec_constant<int, SpecializedKernel> spec1(0);
cl::sycl::ext::oneapi::experimental::spec_constant<int, SpecializedKernel> spec1(0);
// Spec constant name can be declared within a namespace
cl::sycl::ONEAPI::experimental::spec_constant<int, test::MySpecConstantWithinANamespace> spec2(0);
cl::sycl::ext::oneapi::experimental::spec_constant<int, test::MySpecConstantWithinANamespace> spec2(0);

double val;
double *ptr = &val; // to avoid "unused" warnings
Expand Down
20 changes: 13 additions & 7 deletions clang/test/SemaSYCL/Inputs/sycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,22 @@ enum class address_space : int {

class property_list {};

namespace INTEL {
namespace ext {
namespace intel {
namespace property {
struct buffer_location {
template <int> class instance {};
};
} // namespace property
} // namespace INTEL
} // namespace intel
} // namespace ext

namespace ONEAPI {
namespace ext {
namespace oneapi {
template <typename... properties>
class accessor_property_list {};
} // namespace ONEAPI
} // namespace oneapi
} // namespace ext

namespace detail {
namespace half_impl {
Expand Down Expand Up @@ -102,7 +106,7 @@ struct DeviceValueType<dataT, access::target::local> {
template <typename dataT, int dimensions, access::mode accessmode,
access::target accessTarget = access::target::global_buffer,
access::placeholder isPlaceholder = access::placeholder::false_t,
typename propertyListT = ONEAPI::accessor_property_list<>>
typename propertyListT = ext::oneapi::accessor_property_list<>>
class accessor {

public:
Expand Down Expand Up @@ -312,12 +316,14 @@ class stream {
int FlushBufferSize;
};

namespace ONEAPI {
namespace ext {
namespace oneapi {
namespace experimental {
template <typename T, typename ID = T>
class spec_constant {};
} // namespace experimental
} // namespace ONEAPI
} // namespace oneapi
} // namespace ext
} // namespace sycl
} // namespace cl

Expand Down
Loading