From fdfe1eaf68e01b7c74677d5d5599deb2ad8928a4 Mon Sep 17 00:00:00 2001 From: "Assiouras, Ioannis" Date: Thu, 22 May 2025 08:38:36 +0100 Subject: [PATCH] SWDEV-508965 - Remove references to HIP_MEMSET_NODE_PARAMS struct (#195) [ROCm/hip-tests commit: d1e6f076e28775b9dd62ed5d13499d06d42ed872] --- .../unit/graph/hipDrvGraphAddMemsetNode.cc | 32 +++++++++---------- .../hipDrvGraphExecMemsetNodeSetParams.cc | 14 ++++---- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/projects/hip-tests/catch/unit/graph/hipDrvGraphAddMemsetNode.cc b/projects/hip-tests/catch/unit/graph/hipDrvGraphAddMemsetNode.cc index e256feb30b..4ccded90ce 100644 --- a/projects/hip-tests/catch/unit/graph/hipDrvGraphAddMemsetNode.cc +++ b/projects/hip-tests/catch/unit/graph/hipDrvGraphAddMemsetNode.cc @@ -39,7 +39,7 @@ static char memSetVal = 'a'; * @{ * @ingroup GraphTest * `hipDrvGraphAddMemsetNode(hipGraphNode_t* phGraphNode, hipGraph_t hGraph, const hipGraphNode_t* - * dependencies, size_t numDependencies, const HIP_MEMSET_NODE_PARAMS* memsetParams, hipCtx_t ctx)` + * dependencies, size_t numDependencies, const hipMemsetParams* memsetParams, hipCtx_t ctx)` * - Creates a memset node and adds it to a graph */ @@ -66,7 +66,7 @@ TEMPLATE_TEST_CASE("Unit_hipDrvGraphAddMemsetNode_Positive_Basic", "", uint8_t, CHECK_IMAGE_SUPPORT - const auto f = [&context](HIP_MEMSET_NODE_PARAMS* params) { + const auto f = [&context](hipMemsetParams* params) { hipGraph_t graph = nullptr; HIP_CHECK(hipGraphCreate(&graph, 0)); @@ -85,7 +85,7 @@ TEMPLATE_TEST_CASE("Unit_hipDrvGraphAddMemsetNode_Positive_Basic", "", uint8_t, return hipSuccess; }; - GraphMemsetNodeCommonPositive(f); + GraphMemsetNodeCommonPositive(f); HIP_CHECK(hipCtxPopCurrent(&context)); HIP_CHECK(hipCtxDestroy(context)); @@ -129,7 +129,7 @@ TEST_CASE("Unit_hipDrvGraphAddMemsetNode_Negative_Parameters") { HIP_CHECK(hipGraphCreate(&graph, 0)); LinearAllocGuard alloc(LinearAllocs::hipMalloc, 4 * sizeof(int)); - HIP_MEMSET_NODE_PARAMS params = {}; + hipMemsetParams params = {}; params.dst = alloc.ptr(); params.elementSize = sizeof(*alloc.ptr()); params.width = 1; @@ -189,9 +189,9 @@ TEST_CASE("Unit_hipDrvGraphAddMemsetNode_hipMallocPitch_2D") { HIP_CHECK(hipGraphCreate(&graph, 0)); hipGraphNode_t memsetNode, memcpyNode; // Add MemSet Node - HIP_MEMSET_NODE_PARAMS memsetParams{}; + hipMemsetParams memsetParams{}; memset(&memsetParams, 0, sizeof(memsetParams)); - memsetParams.dst = reinterpret_cast(A_d); + memsetParams.dst = reinterpret_cast(A_d); memsetParams.value = memSetVal; memsetParams.pitch = pitch_A; memsetParams.elementSize = sizeof(char); @@ -272,9 +272,9 @@ TEST_CASE("Unit_hipDrvGraphAddMemsetNode_hipMallocPitch_1D") { HIP_CHECK(hipGraphCreate(&graph, 0)); hipGraphNode_t memsetNode, memcpyNode; // Add MemSet Node - HIP_MEMSET_NODE_PARAMS memsetParams{}; + hipMemsetParams memsetParams{}; memset(&memsetParams, 0, sizeof(memsetParams)); - memsetParams.dst = reinterpret_cast(A_d); + memsetParams.dst = reinterpret_cast(A_d); memsetParams.value = memSetVal; memsetParams.pitch = pitch_A; memsetParams.elementSize = sizeof(char); @@ -363,9 +363,9 @@ TEST_CASE("Unit_hipDrvGraphAddMemsetNode_hipMalloc3D_2D") { hipGraphNode_t memsetNode, memcpyNode; // Add MemSet Node - HIP_MEMSET_NODE_PARAMS memsetParams{}; + hipMemsetParams memsetParams{}; memset(&memsetParams, 0, sizeof(memsetParams)); - memsetParams.dst = reinterpret_cast(A_d.ptr); + memsetParams.dst = reinterpret_cast(A_d.ptr); memsetParams.value = memSetVal; memsetParams.pitch = A_d.pitch; memsetParams.elementSize = sizeof(char); @@ -453,9 +453,9 @@ TEST_CASE("Unit_hipDrvGraphAddMemsetNode_hipMalloc3D_1D") { hipGraphNode_t memsetNode, memcpyNode; // Add MemSet Node - HIP_MEMSET_NODE_PARAMS memsetParams{}; + hipMemsetParams memsetParams{}; memset(&memsetParams, 0, sizeof(memsetParams)); - memsetParams.dst = reinterpret_cast(A_d.ptr); + memsetParams.dst = reinterpret_cast(A_d.ptr); memsetParams.value = memSetVal; memsetParams.pitch = A_d.pitch; memsetParams.elementSize = sizeof(char); @@ -535,9 +535,9 @@ TEST_CASE("Unit_hipDrvGraphAddMemsetNode_hipMalloc_1D") { HIP_CHECK(hipGraphCreate(&graph, 0)); // Add Memset node - HIP_MEMSET_NODE_PARAMS memsetParams{}; + hipMemsetParams memsetParams{}; memset(&memsetParams, 0, sizeof(memsetParams)); - memsetParams.dst = reinterpret_cast(A_d); + memsetParams.dst = reinterpret_cast(A_d); memsetParams.value = memSetVal; memsetParams.pitch = Nbytes1D; memsetParams.elementSize = sizeof(char); @@ -622,9 +622,9 @@ TEST_CASE("Unit_hipDrvGraphAddMemsetNode_hipMallocManaged") { HIP_CHECK(hipGraphCreate(&graph, 0)); // Add Memset node - HIP_MEMSET_NODE_PARAMS memsetParams{}; + hipMemsetParams memsetParams{}; memset(&memsetParams, 0, sizeof(memsetParams)); - memsetParams.dst = reinterpret_cast(A_d); + memsetParams.dst = reinterpret_cast(A_d); memsetParams.value = memSetVal; memsetParams.pitch = Nbytes1D; memsetParams.elementSize = sizeof(char); diff --git a/projects/hip-tests/catch/unit/graph/hipDrvGraphExecMemsetNodeSetParams.cc b/projects/hip-tests/catch/unit/graph/hipDrvGraphExecMemsetNodeSetParams.cc index 416e7a5dbc..2ea1a3c492 100644 --- a/projects/hip-tests/catch/unit/graph/hipDrvGraphExecMemsetNodeSetParams.cc +++ b/projects/hip-tests/catch/unit/graph/hipDrvGraphExecMemsetNodeSetParams.cc @@ -73,8 +73,8 @@ TEST_CASE("Unit_hipDrvGraphExecMemsetNodeSetParams_BasicPositive") { hipGraphNode_t memsetNode, memcpyNode; // Prepare memset node - HIP_MEMSET_NODE_PARAMS initialMemsetParams{}; - initialMemsetParams.dst = devMemSrc; + hipMemsetParams initialMemsetParams{}; + initialMemsetParams.dst = reinterpret_cast(devMemSrc); initialMemsetParams.pitch = pitch; initialMemsetParams.elementSize = sizeof(char); initialMemsetParams.width = width; @@ -118,8 +118,8 @@ TEST_CASE("Unit_hipDrvGraphExecMemsetNodeSetParams_BasicPositive") { REQUIRE(hostMemDst[i] == value); } - HIP_MEMSET_NODE_PARAMS newMemsetParams{}; - newMemsetParams.dst = devMemSrc; + hipMemsetParams newMemsetParams{}; + newMemsetParams.dst = reinterpret_cast(devMemSrc); newMemsetParams.pitch = pitch; newMemsetParams.elementSize = sizeof(char); newMemsetParams.width = width; @@ -177,8 +177,8 @@ TEST_CASE("Unit_hipDrvGraphExecMemsetNodeSetParams_Negative") { width, height)); // Prepare memset node - HIP_MEMSET_NODE_PARAMS memsetParams{}; - memsetParams.dst = devMemSrc; + hipMemsetParams memsetParams{}; + memsetParams.dst = reinterpret_cast(devMemSrc); memsetParams.pitch = pitch; memsetParams.elementSize = sizeof(char); memsetParams.width = width; @@ -208,7 +208,7 @@ TEST_CASE("Unit_hipDrvGraphExecMemsetNodeSetParams_Negative") { hipErrorInvalidValue); } SECTION("Invalid destination address in Node params") { - HIP_MEMSET_NODE_PARAMS memsetParams{}; + hipMemsetParams memsetParams{}; memsetParams.dst = 0; memsetParams.pitch = pitch; memsetParams.elementSize = sizeof(char);