SWDEV-491252 - Add stream capture testcases to host allocation APIs (#590)

* SWDEV-491252 - Add stream capture testcases to host allocation APIs

* SWDEV-491252 - Add stream capture behavior testcase for hipFreeHost

* SWDEV-491252 - Refactor capture testcases

* SWDEV-491252 - Run clang-format

---------

Co-authored-by: Marko Arandjelovic <Marko.Arandjelovic@amd.com>
This commit is contained in:
systems-assistant[bot]
2025-09-02 16:58:02 +02:00
committed by GitHub
parent 0468340d03
commit bfbb005c42
10 changed files with 165 additions and 1 deletions
@@ -297,3 +297,17 @@ TEST_CASE("Unit_hipHostMalloc_AllocateUseMoreThanAvailGPUMemory") {
}
}
#endif
TEST_CASE("Unit_hipHostMalloc_Capture") {
int* host_ptr = nullptr;
hipError_t capture_error = hipSuccess;
constexpr bool kRelaxedModeAllowed = true;
BEGIN_CAPTURE_SYNC(capture_error, kRelaxedModeAllowed);
HIP_CHECK_ERROR(hipHostMalloc(reinterpret_cast<void**>(&host_ptr), sizeBytes), capture_error);
END_CAPTURE_SYNC(capture_error);
if (host_ptr != nullptr) {
HIP_CHECK(hipHostFree(host_ptr));
}
}