SWDEV-508965 - Remove references to HIP_MEMSET_NODE_PARAMS struct (#195)

[ROCm/hip-tests commit: d1e6f076e2]
Этот коммит содержится в:
Assiouras, Ioannis
2025-05-22 08:38:36 +01:00
коммит произвёл GitHub
родитель 103dcd35af
Коммит fdfe1eaf68
2 изменённых файлов: 23 добавлений и 23 удалений
+16 -16
Просмотреть файл
@@ -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<TestType, HIP_MEMSET_NODE_PARAMS>(f);
GraphMemsetNodeCommonPositive<TestType, hipMemsetParams>(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<int> 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<hipDeviceptr_t>(A_d);
memsetParams.dst = reinterpret_cast<void*>(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<hipDeviceptr_t>(A_d);
memsetParams.dst = reinterpret_cast<void*>(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<hipDeviceptr_t>(A_d.ptr);
memsetParams.dst = reinterpret_cast<void*>(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<hipDeviceptr_t>(A_d.ptr);
memsetParams.dst = reinterpret_cast<void*>(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<hipDeviceptr_t>(A_d);
memsetParams.dst = reinterpret_cast<void*>(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<hipDeviceptr_t>(A_d);
memsetParams.dst = reinterpret_cast<void*>(A_d);
memsetParams.value = memSetVal;
memsetParams.pitch = Nbytes1D;
memsetParams.elementSize = sizeof(char);
+7 -7
Просмотреть файл
@@ -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<void*>(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<void*>(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<void*>(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);