Skip to content

Commit e9f6e4e

Browse files
committed
Fix unit test build and ProcessKernelRuntimeInfo calls
1 parent d708c93 commit e9f6e4e

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

sycl/cmake/modules/AddSYCLUnitTest.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ function(add_sycl_unittest_internal test_dirname link_variant is_preview is_no_c
3434
# Chaning CMAKE_CURRENT_BINARY_DIR should not affect this variable in its
3535
# parent scope.
3636
if (${is_preview})
37-
if (${is_no_cgh})
38-
set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/PreviewNoCGH")
39-
else()
4037
set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/Preview")
41-
endif()
38+
endif()
39+
40+
if (${is_no_cgh})
41+
set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/NoCGH")
4242
endif()
4343

4444
if ("${link_variant}" MATCHES "SHARED")
@@ -66,11 +66,11 @@ function(add_sycl_unittest_internal test_dirname link_variant is_preview is_no_c
6666
if (${is_preview})
6767
target_compile_definitions(${test_dirname}
6868
PRIVATE __INTEL_PREVIEW_BREAKING_CHANGES)
69-
if (${is_no_cgh})
70-
set(sycl_cache_suffix "_non_preview_no_cgh")
71-
else()
72-
set(sycl_cache_suffix "_preview")
73-
endif()
69+
set(sycl_cache_suffix "_preview")
70+
endif()
71+
72+
if (${is_no_cgh})
73+
set(sycl_cache_suffix "_no_cgh")
7474
endif()
7575

7676
if (${is_no_cgh})
@@ -175,6 +175,6 @@ endfunction()
175175
# Produces two binaries, named `basename(test_name_prefix_non_preview)` and `basename(test_name_prefix_preview)`
176176
macro(add_sycl_unittest test_name_prefix link_variant)
177177
add_sycl_unittest_internal(${test_name_prefix}_non_preview ${link_variant} FALSE FALSE ${ARGN})
178-
add_sycl_unittest_internal(${test_name_prefix}_non_preview_no_cgh ${link_variant} FALSE TRUE ${ARGN})
178+
add_sycl_unittest_internal(${test_name_prefix}_no_cgh ${link_variant} FALSE TRUE ${ARGN})
179179
add_sycl_unittest_internal(${test_name_prefix}_preview ${link_variant} TRUE FALSE ${ARGN})
180180
endmacro()

sycl/include/sycl/queue.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3896,8 +3896,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
38963896
typename detail::get_kernel_name_t<KernelName, KernelType>::name;
38973897

38983898
ProcessSubmitProperties(Props, SI);
3899-
ProcessKernelRuntimeInfo<NameT, KernelType, Dims>(Props, KernelFunc,
3900-
KRInfo);
3899+
ProcessKernelRuntimeInfo<NameT, KernelType, Dims>(KernelFunc, KRInfo);
39013900

39023901
detail::KernelWrapper<detail::WrapAs::parallel_for, NameT, KernelType,
39033902
sycl::nd_item<Dims>, PropertiesT>::wrap(KernelFunc);
@@ -3921,8 +3920,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
39213920
typename detail::get_kernel_name_t<KernelName, KernelType>::name;
39223921

39233922
ProcessSubmitProperties(Props, SI);
3924-
ProcessKernelRuntimeInfo<NameT, KernelType, Dims>(Props, KernelFunc,
3925-
KRInfo);
3923+
ProcessKernelRuntimeInfo<NameT, KernelType, Dims>(KernelFunc, KRInfo);
39263924

39273925
detail::KernelWrapper<detail::WrapAs::parallel_for, NameT, KernelType,
39283926
sycl::nd_item<Dims>, PropertiesT>::wrap(KernelFunc);

sycl/unittests/xpti_trace/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ add_sycl_unittest(XptiTraceTests OBJECT
88
)
99
target_link_libraries(XptiTraceTests_non_preview PRIVATE xpti xptitest_subscriber)
1010
target_link_libraries(XptiTraceTests_preview PRIVATE xpti xptitest_subscriber)
11-
target_link_libraries(XptiTraceTests_non_preview_no_cgh PRIVATE xpti xptitest_subscriber)
11+
target_link_libraries(XptiTraceTests_no_cgh PRIVATE xpti xptitest_subscriber)

0 commit comments

Comments
 (0)