kfdtest: Using non-paged memory allocation for wptr on devices that have MES scheduler

Starting with GFX11, wptr BOs must be mapped to GART for MES to determine work
on unmapped queues for usermode queue oversubscription (no aggregated doorbell)

Change-Id: I10e30fdc2bec587cef9427faa4874957988c34b3
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Tá an tiomantas seo le fáil i:
Yifan Zhang údaraithe agus Yifan1 Zhang tiomanta 2023-05-12 01:06:37 -04:00
1 tuismitheoir 53ed978c3d
tiomantas d319660838
3 comhad athraithe
+4 -4

Níor tháinig aon chomhaid le do chuardach

+1 -1
Féach ar an gComhad
@@ -1174,7 +1174,7 @@ TEST_F(KFDQMTest, CreateAqlCpQueue) {
int defaultGPUNode = m_NodeInfo.HsaDefaultGPUNode();
ASSERT_GE(defaultGPUNode, 0) << "failed to get default GPU Node";
HsaMemoryBuffer pointers(PAGE_SIZE, defaultGPUNode);
HsaMemoryBuffer pointers(PAGE_SIZE, defaultGPUNode, /*zero*/true, /*local*/false, /*exec*/false, /*isScratch */false, /* isReadOnly */false, /* isUncached */false, /* NonPaged */g_baseTest->NeedNonPagedWptr(defaultGPUNode));
ASSERT_SUCCESS(queue.Create(defaultGPUNode, PAGE_SIZE, pointers.As<HSAuint64 *>()));
+2 -2
Féach ar an gComhad
@@ -255,7 +255,7 @@ HSAuint64 GetSystemTickCountInMicroSec() {
const HsaMemoryBuffer HsaMemoryBuffer::Null;
HsaMemoryBuffer::HsaMemoryBuffer(HSAuint64 size, unsigned int node, bool zero, bool isLocal, bool isExec,
bool isScratch, bool isReadOnly, bool isUncached)
bool isScratch, bool isReadOnly, bool isUncached, bool NonPaged)
:m_Size(size),
m_pUser(NULL),
m_pBuf(NULL),
@@ -279,7 +279,7 @@ HsaMemoryBuffer::HsaMemoryBuffer(HSAuint64 size, unsigned int node, bool zero, b
EXPECT_EQ(isUncached, 0) << "Uncached flag is relevant only for system or host memory";
} else {
m_Flags.ui32.HostAccess = 1;
m_Flags.ui32.NonPaged = 0;
m_Flags.ui32.NonPaged = NonPaged ? 1 : 0;
m_Flags.ui32.CoarseGrain = 0;
m_Flags.ui32.NoNUMABind = 1;
m_Flags.ui32.Uncached = isUncached;
+1 -1
Féach ar an gComhad
@@ -68,7 +68,7 @@ class HsaMemoryBuffer {
public:
HsaMemoryBuffer(HSAuint64 size, unsigned int node, bool zero = true, bool isLocal = false,
bool isExec = false, bool isScratch = false, bool isReadOnly = false, bool isUncached = false);
bool isExec = false, bool isScratch = false, bool isReadOnly = false, bool isUncached = false, bool NonPaged = false);
HsaMemoryBuffer(void *addr, HSAuint64 size);
template<typename RetType>
RetType As() {