Simplify new_kernel_name implementation in tests#2128
Conversation
eae40da to
fc30465
Compare
|
Is there a reason there are 2 nested copies of |
In any case now template <typename Policy>
using __policy_kernel_name = typename ::std::decay_t<Policy>::kernel_name; |
Yes, but in your "after" result, we still have 2 nested |
As example I have used the policy creation at auto new_policy = make_new_policy<new_kernel_name<Policy, 0>>(exec);at this point the type of So I think it's the question for test environment staff, not for
template <::std::size_t CallNumber = 0>
struct invoke_on_all_hetero_policies::operator()(Op op, Args&&... rest) |
9ea0453 to
d3cff9c
Compare
d19308f to
592fc8c
Compare
eae2814 to
db08779
Compare
…e implementation in tests
…lementation in tests
db08779 to
b2f1493
Compare
941fc19 to
923b9c5
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…TestUtils::TestPolicyName' named in nested name specifier Building CXX object test/CMakeFiles/header_inclusion_order_async_0.pass.dir/general/header_inclusion_order_async_0.pass.cpp.o In file included from /test/general/header_inclusion_order_async_0.pass.cpp:19: In file included from /test/support/utils.h:47: In file included from /test/support/utils_test_base.h:25: In file included from /test/support/utils_invoke.h:25: /test/support/utils_sycl_defs.h:53:1: error: incomplete type 'TestUtils::TestPolicyName' named in nested name specifier 53 | using new_kernel_name = unique_kernel_name<typename std::decay_t<Policy>::kernel_name, idx>; | ^~~~~ /test/support/utils_invoke.h:132:39: note: in instantiation of template type alias 'new_kernel_name' requested here 132 | using _NewKernelName = TestUtils::new_kernel_name<PolicyName, call_id>; | ^ /test/general/header_inclusion_order_async_0.pass.cpp:26:30: note: in instantiation of function template specialization 'TestUtils::get_dpcpp_test_policy<0, TestUtils::TestPolicyName>' requested here 26 | auto policy = TestUtils::get_dpcpp_test_policy(); | ^ /test/support/utils_invoke.h:126:8: note: forward declaration of 'TestUtils::TestPolicyName' 126 | struct TestPolicyName; | ^ 1 error generated.
In file included from test/xpu_api/language.support/support.limits/limits/quiet_NaN.pass.cpp:20: In file included from test/support/test_complex.h:23: In file included from test/support/utils.h:47: In file included from test/support/utils_test_base.h:25: In file included from test/support/utils_invoke.h:25: test/support/utils_sycl_defs.h:24:14: fatal error: 'CL/sycl.hpp' file not found 24 | # include <CL/sycl.hpp> | ^~~~~~~~~~~~~
13d7310 to
b5f855d
Compare
…index function should be marked inline to avoid potential ODR (One Definition Rule) violations when this header is included in multiple translation units
…mplate parameter name idx is inconsistent with CallNumber used in other templates in this file
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
danhoeflinger
left a comment
There was a problem hiding this comment.
As long as tests work after this, the changes LGTM.
(may require more than the per-commit CI to cover this well either locally or in the CI)
This PR centralizes and simplifies the
new_kernel_namemachinery for tests by moving common templates into a single header and removing redundant definitions elsewhere.uniq_kernel_index,unique_kernel_name, andnew_kernel_nameinutils_sycl_defs.hutils_invoke.h,test_dynamic_selection_utils.h, andtest_dynamic_load_utils.hutils_sycl_defs.hwhere those utilities were previously declared inline