kfdtest: add APUs judgement in LargestVramBufferTest criteria

This patch is to add APUs judgement in LargestVramBufferTest criteria.

Change-Id: Ic69093f8ebed8be0b1c58787e2a294d86fb49bb0
This commit is contained in:
Yifan Zhang
2023-12-28 17:17:31 +08:00
parent 92c0015787
commit 808a4428b6
+5 -1
View File
@@ -771,7 +771,11 @@ TEST_F(KFDMemoryTest, LargestVramBufferTest) {
<< lastTestedSizeMB << "MB" << std::endl;
/* Make sure 3/5 vram can be allocated.*/
EXPECT_GE(lastTestedSizeMB * 5, vramSizeMB * 3);
if (vramSizeMB <= 512)
EXPECT_GE(lastTestedSizeMB * 5, vramSizeMB * 3);
else
EXPECT_GE(lastTestedSizeMB * 4, vramSizeMB * 3);
if (lastTestedSizeMB * 16 < vramSizeMB * 15)
WARN() << "The largest allocated VRAM buffer size is smaller than the expected "
<< vramSizeMB * 15 / 16 << "MB" << std::endl;