-
Notifications
You must be signed in to change notification settings - Fork 842
[SYCL] Deprecate info::*::reference_count #22521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: sycl
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -386,8 +386,6 @@ int main() { | |
| print_info<info::device::partition_type_affinity_domain, | ||
| info::partition_affinity_domain>(dev, | ||
| "Partition type affinity domain"); | ||
| print_info<info::device::reference_count, sycl::opencl::cl_uint>( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tests also can be guarded with
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm also okay with just removing this. |
||
| dev, "Reference count"); | ||
|
|
||
| std::cout << separator << "Platform information\n" << separator; | ||
| platform plt(dev.get_platform()); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| // UNSUPPORTED: preview-mode | ||
| // UNSUPPORTED-INTENDED: reference_count is unavailable in preview mode. | ||
| // RUN: %{build} -o %t.out | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would |
||
|
|
||
| //==---------- reference_count.cpp - Deprecated info test ------------------==// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include <sycl/context.hpp> | ||
| #include <sycl/device.hpp> | ||
| #include <sycl/event.hpp> | ||
| #include <sycl/kernel.hpp> | ||
| #include <sycl/queue.hpp> | ||
|
|
||
| #include <cstdint> | ||
| #include <type_traits> | ||
|
|
||
| using namespace sycl; | ||
|
|
||
| template <typename SyclObject, typename Param> | ||
| using GetInfoMemberT = uint32_t (SyclObject::*)() const; | ||
|
|
||
| template <typename SyclObject, typename Param> | ||
| GetInfoMemberT<SyclObject, Param> check_get_info() { | ||
| static_assert(std::is_same_v<typename Param::return_type, uint32_t>); | ||
| return &SyclObject::template get_info<Param>; | ||
| } | ||
|
|
||
| int main() { | ||
| auto ContextRefCount = | ||
| check_get_info<context, info::context::reference_count>(); | ||
| auto DeviceRefCount = check_get_info<device, info::device::reference_count>(); | ||
| auto EventRefCount = check_get_info<event, info::event::reference_count>(); | ||
| auto KernelRefCount = check_get_info<kernel, info::kernel::reference_count>(); | ||
| auto QueueRefCount = check_get_info<queue, info::queue::reference_count>(); | ||
|
|
||
| (void)ContextRefCount; | ||
| (void)DeviceRefCount; | ||
| (void)EventRefCount; | ||
| (void)KernelRefCount; | ||
| (void)QueueRefCount; | ||
| return 0; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's guard this include here and in other files so that we don't forget to remove it.