SWDEV-454656 Correct test setup, Unit_hipGraphExecMemcpyNodeSetParams_Positive_Basic

Pitch cannot be lower then width

Change-Id: I929672fad4ca62d21ffd7bfec8bbc837e7bbcee2
This commit is contained in:
Marko Arandjelovic
2024-04-08 13:31:59 +02:00
parent 53c362295c
commit 6867852a89
3 changed files with 6 additions and 8 deletions
@@ -58,15 +58,15 @@ TEST_CASE("Unit_hipGraphExecMemcpyNodeSetParams_Positive_Basic") {
hipGraphNode_t node = nullptr;
const auto offset_src = reinterpret_cast<uint8_t*>(src) + 1;
const auto offset_dst = reinterpret_cast<uint8_t*>(dst) + 1;
auto params =
GetMemcpy3DParms(make_hipPitchedPtr(offset_dst, 0, count - 1, 0), make_hipPos(0, 0, 0),
make_hipPitchedPtr(offset_src, 0, count - 1, 0), make_hipPos(0, 0, 0),
make_hipExtent(count - 1, 1, 1), direction);
auto params = GetMemcpy3DParms(
make_hipPitchedPtr(offset_dst, count - 1, count - 1, 0), make_hipPos(0, 0, 0),
make_hipPitchedPtr(offset_src, count - 1, count - 1, 0), make_hipPos(0, 0, 0),
make_hipExtent(count - 1, 1, 1), direction);
HIP_CHECK(hipGraphAddMemcpyNode(&node, graph, nullptr, 0, &params));
hipGraphExec_t graph_exec = nullptr;
HIP_CHECK(hipGraphInstantiate(&graph_exec, graph, nullptr, nullptr, 0));
params = GetMemcpy3DParms(make_hipPitchedPtr(dst, 0, count, 0), make_hipPos(0, 0, 0),
make_hipPitchedPtr(src, 0, count, 0), make_hipPos(0, 0, 0),
params = GetMemcpy3DParms(make_hipPitchedPtr(dst, count, count, 0), make_hipPos(0, 0, 0),
make_hipPitchedPtr(src, count, count, 0), make_hipPos(0, 0, 0),
make_hipExtent(count, 1, 1), direction);
HIP_CHECK(hipGraphExecMemcpyNodeSetParams(graph_exec, node, &params));
HIP_CHECK(hipGraphLaunch(graph_exec, hipStreamPerThread));