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:
committed by
GitHub
parent
0468340d03
commit
bfbb005c42
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user