Skip to content

Commit f796683

Browse files
Extend zeCommandListAppendMemoryCopyRegion tests with explicit BCS/CCS (#305)
Signed-off-by Misiak, Konstanty <[email protected]>
1 parent a9ec77f commit f796683

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

conformance_tests/core/test_copy/src/test_copy.cpp

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,12 +1132,31 @@ INSTANTIATE_TEST_SUITE_P(
11321132
class AppendMemoryCopyRegionWithSharedSystem
11331133
: public ::testing::Test,
11341134
public ::testing::WithParamInterface<
1135-
std::tuple<size_t, size_t, size_t, bool>> {
1135+
std::tuple<size_t, size_t, size_t, bool, bool>> {
11361136
protected:
11371137
void RunMemoryCopyRegionTest() {
11381138

11391139
is_immediate = std::get<3>(GetParam());
1140-
cmd_bundle = lzt::create_command_bundle(is_immediate);
1140+
use_copy_engine = std::get<4>(GetParam());
1141+
1142+
auto cmd_queue_group_props = get_command_queue_group_properties(
1143+
zeDevice::get_instance()->get_device());
1144+
1145+
const ze_command_queue_group_property_flags_t queue_group_flags_set =
1146+
use_copy_engine
1147+
? ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY
1148+
: (ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE |
1149+
ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
1150+
const ze_command_queue_group_property_flags_t queue_group_flags_not_set =
1151+
use_copy_engine ? ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE : 0;
1152+
auto ordinal =
1153+
lzt::get_queue_ordinal(cmd_queue_group_props, queue_group_flags_set,
1154+
queue_group_flags_not_set);
1155+
ASSERT_TRUE(ordinal);
1156+
1157+
auto cmd_bundle = lzt::create_command_bundle(
1158+
lzt::get_default_context(), zeDevice::get_instance()->get_device(), 0,
1159+
*ordinal, is_immediate);
11411160

11421161
// Set up memory buffers for test
11431162
// Device memory has to be copied in so
@@ -1225,6 +1244,7 @@ class AppendMemoryCopyRegionWithSharedSystem
12251244
size_t columns;
12261245
size_t slices;
12271246
bool is_immediate;
1247+
bool use_copy_engine;
12281248
size_t memory_size;
12291249
};
12301250

@@ -1338,6 +1358,7 @@ INSTANTIATE_TEST_SUITE_P(MemoryCopies, AppendMemoryCopyRegionWithSharedSystem,
13381358
::testing::Values(8, 64), // Cols
13391359
::testing::Values(1, 8,
13401360
64), // Slices
1361+
::testing::Bool(),
13411362
::testing::Bool()));
13421363

13431364
class zeCommandListAppendMemoryCopyTests : public ::testing::Test {

0 commit comments

Comments
 (0)