kfdtest: Add Uncached flag to HsaMemoryBuffer constructor
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Change-Id: I14b0a73ffb04f4798547fe7003de1440736b413d
이 커밋은 다음에 포함됨:
@@ -203,7 +203,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 isScratch, bool isReadOnly, bool isUncached)
|
||||
:m_Size(size),
|
||||
m_pUser(NULL),
|
||||
m_pBuf(NULL),
|
||||
@@ -224,11 +224,13 @@ HsaMemoryBuffer::HsaMemoryBuffer(HSAuint64 size, unsigned int node, bool zero, b
|
||||
m_Flags.ui32.HostAccess = 0;
|
||||
m_Flags.ui32.NonPaged = 1;
|
||||
m_Flags.ui32.CoarseGrain = 1;
|
||||
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.CoarseGrain = 0;
|
||||
m_Flags.ui32.NoNUMABind = 1;
|
||||
m_Flags.ui32.Uncached = isUncached;
|
||||
}
|
||||
|
||||
if (isExec)
|
||||
|
||||
@@ -66,7 +66,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 isExec = false, bool isScratch = false, bool isReadOnly = false, bool isUncached = false);
|
||||
HsaMemoryBuffer(void *addr, HSAuint64 size);
|
||||
template<typename RetType>
|
||||
RetType As() {
|
||||
|
||||
새 이슈에서 참조
사용자 차단