kfdtest: change Largest Buffer search algorithm
The old Largest Buffer search algorithm is using Binary Search algorithm to find last successful memory allocation. But each successful memory allocation takes times. Since the unsuccessful memory allocation returns very quick. Changing the search algorithm to find first successful memory allocation starting from MAX, each testing step with granularity interval will speed up this test. Change-Id: I07daea05423c33e72a483f0013e8ea1b5dabf989 Signed-off-by: James Zhu <James.Zhu@amd.com>
This commit is contained in:
@@ -39,7 +39,7 @@ class KFDMemoryTest : public KFDBaseComponentTest {
|
||||
virtual void TearDown();
|
||||
|
||||
protected:
|
||||
void BinarySearchLargestBuffer(int allocNode, const HsaMemFlags &memFlags,
|
||||
void SearchLargestBuffer(int allocNode, const HsaMemFlags &memFlags,
|
||||
HSAuint64 highMB, int nodeToMap,
|
||||
HSAuint64 *lastSizeMB);
|
||||
void AcquireReleaseTestRunCPU(HSAuint32 acquireNode, bool scalar);
|
||||
|
||||
Reference in New Issue
Block a user