SWDEV-515530 - Re-enable passing tests (#592)

* SWDEV-515530 - Re-enable passing tests

* SWDEV-515530 - Revert back windows config file

* SWDEV-515530 - Fix new line

* SWDEV-515530 - Enable a few more tests

* SWDEV-515530 - Enable passing VMM tests

* SWDEV-515530 - Disable failing tests

* SWDEV-515530 - Fix and enable texture tests

* SWDEV-515530 - Minor fixes

* SWDEV-515530 - Disable one more test

---------

Co-authored-by: Marko Arandjelovic <Marko.Arandjelovic@amd.com>
This commit is contained in:
systems-assistant[bot]
2025-09-02 16:03:07 +02:00
committed by GitHub
parent 43ac6b2ef5
commit ae874b489d
7 changed files with 29 additions and 299 deletions
@@ -648,115 +648,6 @@ TEST_CASE("Unit_hipGraphInstantiateWithFlags_AutoFreeOnLaunchDoubleKernel") {
delete[] hostMemDst;
}
#if __linux__
/**
* Test Description
* ------------------------
* - This test case tests hipGraphInstantiateWithFlags with the flag
* - hipGraphInstantiateFlagAutoFreeOnLaunch for multi process scenario :
* - 1) Take a shared memory and fill it.
* - 2) Create child process.
* - 3) In child process, create graph with following nodes,
* - a. Node to allocate memory - memAllocNode
* - b. Node to copy from shared memory to device - memcpyNodeH2D
* - c. Node to perform double operation - kernelNode
* - d. Node to copy from device to shared memory - memcpyNodeD2H
* - 4) Wait in parent process to complete child process task and
* - shared memory should contain the expected value and
* - it should not give memory related issues.
* Test source
* ------------------------
* - unit/graph/hipGraphInstantiateWithFlags.cc
*/
TEST_CASE("Unit_hipGraphInstantiateWithFlags_AutoFreeOnLaunchMultiProcess") {
int shmid = shmget(IPC_PRIVATE, NBYTES, 0666);
int* shared_mem = reinterpret_cast<int*>(shmat(shmid, NULL, 0));
REQUIRE(shared_mem != nullptr);
std::fill(shared_mem, shared_mem + SIZE, 10);
auto pid = fork();
if (pid != 0) { // parent process
REQUIRE(wait(NULL) >= 0);
for (int idx = 0; idx < SIZE; idx++) {
INFO("At index : " << idx << ", Got value : " << shared_mem[idx] << ", Expected value : 20"
<< "\n");
REQUIRE(shared_mem[idx] == 20);
}
} else { // child process
REQUIRE(shared_mem != nullptr);
hipGraph_t graph;
HIP_CHECK(hipGraphCreate(&graph, 0));
hipStream_t stream;
HIP_CHECK(hipStreamCreate(&stream));
REQUIRE(stream != nullptr);
int* devMem = nullptr;
hipGraphNode_t memAllocNode, memcpyNodeH2D, kernelNode, memcpyNodeD2H;
hipMemAllocNodeParams memAllocNodeParams{};
memAllocNodeParams.poolProps.allocType = hipMemAllocationTypePinned;
memAllocNodeParams.poolProps.handleTypes = hipMemHandleTypeNone;
memAllocNodeParams.poolProps.location.type = hipMemLocationTypeDevice;
memAllocNodeParams.poolProps.location.id = 0;
memAllocNodeParams.bytesize = NBYTES;
HIP_CHECK(hipGraphAddMemAllocNode(&memAllocNode, graph, nullptr, 0, &memAllocNodeParams));
devMem = reinterpret_cast<int*>(memAllocNodeParams.dptr);
REQUIRE(devMem != nullptr);
::std::vector<hipGraphNode_t> memcpyNodeH2DDependencies;
memcpyNodeH2DDependencies.push_back(memAllocNode);
HIP_CHECK(hipGraphAddMemcpyNode1D(&memcpyNodeH2D, graph, memcpyNodeH2DDependencies.data(),
memcpyNodeH2DDependencies.size(), devMem, shared_mem, NBYTES,
hipMemcpyHostToDevice));
::std::vector<hipGraphNode_t> kernelNodeDependencies;
kernelNodeDependencies.push_back(memcpyNodeH2D);
hipKernelNodeParams kernelNodeParams{};
kernelNodeParams.func = reinterpret_cast<void*>(doubleKernel);
kernelNodeParams.gridDim = dim3(1, 1, 1);
kernelNodeParams.blockDim = dim3(1, 1, 1);
kernelNodeParams.sharedMemBytes = 0;
int size = SIZE;
void* kernelArgs[2] = {reinterpret_cast<void*>(&devMem), reinterpret_cast<void*>(&size)};
kernelNodeParams.kernelParams = kernelArgs;
kernelNodeParams.extra = nullptr;
HIP_CHECK(hipGraphAddKernelNode(&kernelNode, graph, kernelNodeDependencies.data(),
kernelNodeDependencies.size(), &kernelNodeParams));
::std::vector<hipGraphNode_t> memcpyNodeD2HDependencies;
memcpyNodeD2HDependencies.push_back(kernelNode);
HIP_CHECK(hipGraphAddMemcpyNode1D(&memcpyNodeD2H, graph, memcpyNodeD2HDependencies.data(),
memcpyNodeD2HDependencies.size(), shared_mem, devMem, NBYTES,
hipMemcpyDeviceToHost));
hipGraphExec_t graphExec;
HIP_CHECK(
hipGraphInstantiateWithFlags(&graphExec, graph, hipGraphInstantiateFlagAutoFreeOnLaunch));
HIP_CHECK(hipGraphLaunch(graphExec, stream));
HIP_CHECK(hipStreamSynchronize(stream));
HIP_CHECK(hipGraphExecDestroy(graphExec));
HIP_CHECK(hipGraphDestroy(graph));
HIP_CHECK(hipStreamDestroy(stream));
HIP_CHECK(hipFree(devMem));
}
shmdt(shared_mem);
shmctl(shmid, IPC_RMID, 0);
}
#endif
/**
* Test Description
* ------------------------