kfdtest: Skip ContiguousVRAMAllocation if no enough VRAM

RDMATest.ContiguousVRAMAllocation test uses 4GB buffer, skip the test if
total VRAM size is less than 5GB, considering page table and other
reserved VRAM usage.

Change-Id: I0342417501cdd3477c2bf1b2f7d1e6bef61d1871
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Chris Freehill <cfreehil@amd.com>


[ROCm/ROCR-Runtime commit: 42df8b2b34]
此提交包含在:
Philip Yang
2024-06-17 13:30:19 -04:00
提交者 Chris Freehill
父節點 405b60af73
當前提交 b6e18ceeae
+5
查看文件
@@ -125,6 +125,11 @@ TEST_F(RDMATest, ContiguousVRAMAllocation) {
int defaultGPUNode = m_NodeInfo.HsaDefaultGPUNode();
ASSERT_GE(defaultGPUNode, 0) << "failed to get default GPU Node";
if (GetVramSize(defaultGPUNode) < BufferSize + (1UL << 30)) {
LOG() << "no enough VRAM, skipping the test" << std::endl;
return;
}
HsaMemoryBuffer isaBuffer(PAGE_SIZE, defaultGPUNode);
HsaMemoryBuffer srcSysBuffer(PAGE_SIZE, defaultGPUNode, false);
void *LocalBuffer;