Skip to content

Commit 96b292d

Browse files
committed
use detail namespace
Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 942ff8c commit 96b292d

File tree

5 files changed

+20
-28
lines changed

5 files changed

+20
-28
lines changed

sycl/include/sycl/ext/intel/experimental/kernel_properties.hpp renamed to sycl/include/sycl/detail/kernel_properties.hpp

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,49 +15,43 @@
1515

1616
namespace sycl {
1717
__SYCL_INLINE_VER_NAMESPACE(_V1) {
18-
namespace ext {
19-
namespace intel::experimental {
20-
18+
namespace detail {
2119
enum class register_alloc_mode_enum : uint32_t {
2220
automatic = 0,
2321
large = 2,
2422
};
2523

2624
struct register_alloc_mode_key {
2725
template <register_alloc_mode_enum Mode>
28-
using value_t = oneapi::experimental::property_value<
26+
using value_t = sycl::ext::oneapi::experimental::property_value<
2927
register_alloc_mode_key,
3028
std::integral_constant<register_alloc_mode_enum, Mode>>;
3129
};
3230

3331
template <register_alloc_mode_enum Mode>
3432
inline constexpr register_alloc_mode_key::value_t<Mode> register_alloc_mode;
35-
} // namespace intel::experimental
33+
} // namespace detail
3634

37-
namespace oneapi::experimental {
35+
namespace ext::oneapi::experimental {
3836
template <>
39-
struct is_property_key<intel::experimental::register_alloc_mode_key>
40-
: std::true_type {};
37+
struct is_property_key<sycl::detail::register_alloc_mode_key> : std::true_type {
38+
};
4139

4240
namespace detail {
43-
template <>
44-
struct PropertyToKind<intel::experimental::register_alloc_mode_key> {
41+
template <> struct PropertyToKind<sycl::detail::register_alloc_mode_key> {
4542
static constexpr PropKind Kind = PropKind::RegisterAllocMode;
4643
};
4744

4845
template <>
49-
struct IsCompileTimeProperty<intel::experimental::register_alloc_mode_key>
46+
struct IsCompileTimeProperty<sycl::detail::register_alloc_mode_key>
5047
: std::true_type {};
5148

52-
template <intel::experimental::register_alloc_mode_enum Mode>
53-
struct PropertyMetaInfo<
54-
intel::experimental::register_alloc_mode_key::value_t<Mode>> {
49+
template <sycl::detail::register_alloc_mode_enum Mode>
50+
struct PropertyMetaInfo<sycl::detail::register_alloc_mode_key::value_t<Mode>> {
5551
static constexpr const char *name = "sycl-register-alloc-mode";
56-
static constexpr intel::experimental::register_alloc_mode_enum value = Mode;
52+
static constexpr sycl::detail::register_alloc_mode_enum value = Mode;
5753
};
58-
5954
} // namespace detail
60-
} // namespace oneapi::experimental
61-
} // namespace ext
55+
} // namespace ext::oneapi::experimental
6256
} // __SYCL_INLINE_VER_NAMESPACE(_V1)
6357
} // namespace sycl

sycl/include/sycl/sycl.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
#include <sycl/ext/oneapi/backend/level_zero.hpp>
6464
#endif
6565
#include <sycl/ext/codeplay/experimental/fusion_wrapper.hpp>
66-
#include <sycl/ext/intel/experimental/kernel_properties.hpp>
6766
#include <sycl/ext/intel/experimental/pipe_properties.hpp>
6867
#include <sycl/ext/intel/experimental/pipes.hpp>
6968
#include <sycl/ext/intel/usm_pointers.hpp>

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
#include <sycl/backend_types.hpp>
2323
#include <sycl/context.hpp>
2424
#include <sycl/detail/common.hpp>
25+
#include <sycl/detail/kernel_properties.hpp>
2526
#include <sycl/detail/os_util.hpp>
2627
#include <sycl/detail/type_traits.hpp>
2728
#include <sycl/detail/util.hpp>
2829
#include <sycl/device.hpp>
2930
#include <sycl/exception.hpp>
30-
#include <sycl/ext/intel/experimental/kernel_properties.hpp>
3131
#include <sycl/ext/oneapi/experimental/spec_constant.hpp>
3232
#include <sycl/stl.hpp>
3333

@@ -382,18 +382,14 @@ static void appendCompileOptionsForRegAllocMode(std::string &CompileOpts,
382382
if (!Prop)
383383
return;
384384
uint32_t PropVal = DeviceBinaryProperty(Prop).asUint32();
385-
if (PropVal ==
386-
static_cast<uint32_t>(
387-
ext::intel::experimental::register_alloc_mode_enum::large)) {
385+
if (PropVal == static_cast<uint32_t>(register_alloc_mode_enum::large)) {
388386
if (!CompileOpts.empty())
389387
CompileOpts += " ";
390388
// This option works for both LO AND OCL backends.
391389
CompileOpts += IsEsimdImage ? "-doubleGRF" : "-ze-opt-large-register-file";
392390
}
393391
// TODO: Support Auto GRF for ESIMD once vc supports it.
394-
if (PropVal ==
395-
static_cast<uint32_t>(
396-
ext::intel::experimental::register_alloc_mode_enum::automatic) &&
392+
if (PropVal == static_cast<uint32_t>(register_alloc_mode_enum::automatic) &&
397393
!IsEsimdImage) {
398394
if (!CompileOpts.empty())
399395
CompileOpts += " ";

sycl/test-e2e/DeviceCodeSplit/grf.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@
2626
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" SYCL_PI_TRACE=-1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-WITH-VAR
2727
#include "../helpers.hpp"
2828
#include <iostream>
29+
#include <sycl/detail/kernel_properties.hpp>
2930
#include <sycl/sycl.hpp>
3031

3132
using namespace sycl;
33+
using namespace sycl::detail;
3234
using namespace sycl::ext::intel::experimental;
3335
using namespace sycl::ext::oneapi::experimental;
3436

sycl/test-e2e/ESIMD/large-grf.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
#include "esimd_test_utils.hpp"
2525

2626
#include <iostream>
27+
#include <sycl/detail/kernel_properties.hpp>
2728
#include <sycl/ext/intel/esimd.hpp>
2829
#include <sycl/sycl.hpp>
2930

3031
using namespace sycl;
32+
using namespace sycl::detail;
3133
using namespace sycl::ext::intel::esimd;
3234
using namespace sycl::ext::intel::experimental;
3335
using namespace sycl::ext::intel::experimental::esimd;
@@ -121,8 +123,7 @@ int main(void) {
121123
buffer<float, 1> bufa(A.data(), range<1>(Size));
122124
queue q(esimd_test::ESIMDSelector, esimd_test::createExceptionHandler());
123125
sycl::ext::oneapi::experimental::properties prop{
124-
sycl::ext::intel::experimental::register_alloc_mode<
125-
sycl::ext::intel::experimental::register_alloc_mode_enum::large>};
126+
register_alloc_mode<register_alloc_mode_enum::large>};
126127
auto dev = q.get_device();
127128
std::cout << "Running on " << dev.get_info<info::device::name>() << "\n";
128129

0 commit comments

Comments
 (0)