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>
Цей коміт міститься в:
systems-assistant[bot]
2025-09-02 16:58:02 +02:00
зафіксовано GitHub
джерело 0468340d03
коміт bfbb005c42
10 змінених файлів з 165 додано та 1 видалено
+17
Переглянути файл
@@ -71,3 +71,20 @@ TEST_CASE("Unit_hipMallocHost_Negative") {
HIP_CHECK_ERROR(hipMallocHost(reinterpret_cast<void**>(&host_memory), -1), hipErrorOutOfMemory);
}
}
TEST_CASE("Unit_hipMallocHost_Capture") {
int* host_memory = nullptr;
hipError_t capture_error = hipSuccess;
constexpr bool kRelaxedModeAllowed = true;
BEGIN_CAPTURE_SYNC(capture_error, kRelaxedModeAllowed);
HIP_CHECK_ERROR(hipMallocHost(reinterpret_cast<void**>(&host_memory), sizeof(int)),
capture_error);
END_CAPTURE_SYNC(capture_error);
if (capture_error == hipSuccess) {
REQUIRE(host_memory != nullptr);
HIP_CHECK(hipHostFree(host_memory));
}
}