Skip to content

Commit 3cb953b

Browse files
[SYCL][NFC] Drop platform.hpp includes core.hpp (#18779)
Code that prints platform info was completely dropped from some tests (instead of adding corresponding `#include`), because that information is anyway unused in our testing infrastructure.
1 parent 3310db3 commit 3cb953b

File tree

65 files changed

+65
-30
lines changed

Some content is hidden

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

65 files changed

+65
-30
lines changed

sycl/include/sycl/context.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
1515
#include <sycl/detail/info_desc_helpers.hpp> // for is_context_info_desc
1616
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
17-
#include <sycl/platform.hpp> // for platform
1817
#include <sycl/property_list.hpp> // for property_list
1918
#include <sycl/usm/usm_enums.hpp> // for usm::alloc
2019
#include <ur_api.h> // for ur_native_handle_t

sycl/include/sycl/ext/oneapi/owner_less.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <sycl/ext/oneapi/weak_object.hpp> // for weak_object
1919
#include <sycl/kernel.hpp> // for kernel
2020
#include <sycl/kernel_bundle_enums.hpp> // for bundle_state
21-
#include <sycl/platform.hpp> // for platform
2221
#include <sycl/properties/image_properties.hpp> // for sampled_i...
2322
#include <sycl/queue.hpp> // for queue
2423
#include <sycl/stream.hpp> // for stream
@@ -28,6 +27,7 @@ inline namespace _V1 {
2827
class kernel_id;
2928
template <bundle_state State> class kernel_bundle;
3029
template <bundle_state State> class device_image;
30+
class platform;
3131

3232
namespace ext::oneapi {
3333

sycl/source/detail/device_impl.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <sycl/ext/oneapi/experimental/device_architecture.hpp>
1717
#include <sycl/ext/oneapi/experimental/forward_progress.hpp>
1818
#include <sycl/kernel_bundle.hpp>
19+
#include <sycl/platform.hpp>
1920

2021
#include <memory>
2122
#include <mutex>
@@ -25,9 +26,6 @@
2526
namespace sycl {
2627
inline namespace _V1 {
2728

28-
// Forward declaration
29-
class platform;
30-
3129
namespace detail {
3230

3331
// Note that UR's enums have weird *_FORCE_UINT32 values, we ignore them in the

sycl/source/detail/kernel_bundle_impl.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,7 @@ class kernel_bundle_impl {
688688

689689
bool empty() const noexcept { return MDeviceImages.empty(); }
690690

691-
backend get_backend() const noexcept {
692-
return MContext.get_platform().get_backend();
693-
}
691+
backend get_backend() const noexcept { return MContext.get_backend(); }
694692

695693
context get_context() const noexcept { return MContext; }
696694

sycl/test-e2e/AbiNeutral/catch-exception.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// _GLIBCXX_USE_CXX11_ABI=0.
99

1010
#include <sycl/detail/core.hpp>
11+
#include <sycl/platform.hpp>
1112

1213
int main() {
1314
#ifdef _GLIBCXX_USE_CXX11_ABI

sycl/test-e2e/AbiNeutral/device-info.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <iostream>
1111
#include <mutex>
1212
#include <sycl/detail/core.hpp>
13+
#include <sycl/platform.hpp>
1314
#include <vector>
1415

1516
template <typename T> using dpcpp_info_t = typename T::return_type;

sycl/test-e2e/Adapters/level_zero/imm_cmdlist_per_thread.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ int main() {
7373

7474
// Create one queue
7575
auto D = Queue.get_device();
76-
const char *devType = D.is_cpu() ? "CPU" : "GPU";
77-
std::string adapterName = D.get_platform().get_info<info::platform::name>();
78-
std::cout << "Running on device " << devType << " ("
79-
<< D.get_info<info::device::name>() << ") " << adapterName
80-
<< " adapter\n";
8176

8277
// Use queue in multiple threads
8378
std::thread T1(run_sample, Queue, 0);

sycl/test-e2e/Adapters/retain_events.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <cstdio>
1010
#include <numeric>
1111
#include <sycl/detail/core.hpp>
12+
#include <sycl/platform.hpp>
1213
#include <sycl/usm.hpp>
1314

1415
namespace {

sycl/test-e2e/BFloat16/bfloat16_type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main() {
1818
#ifdef USE_CUDA_SM80
1919
// Special build for SM80 CUDA.
2020
sycl::device Dev{default_selector_v};
21-
if (Dev.get_platform().get_backend() != backend::ext_oneapi_cuda) {
21+
if (Dev.get_backend() != backend::ext_oneapi_cuda) {
2222
std::cout << "Test skipped; CUDA run was not run with CUDA device."
2323
<< std::endl;
2424
return 0;

sycl/test-e2e/Basic/aspects.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include <iostream>
1515
#include <sycl/detail/core.hpp>
16+
#include <sycl/platform.hpp>
1617

1718
using namespace sycl;
1819

0 commit comments

Comments
 (0)