Report SVM range queries with both coarse and fine grain as indeterminate.
Previously ranges were reported as fine if and only if they were entirely fine. Coarse and mixed ranges were reported as coarse. For gfx90a it is critical to know if a range is coarse or fine as fp atomics targeting fine do not function. Range queried reporting coarse must be able to be trusted so must only report coarse if the entire region is coarse. Change-Id: I29c654a2afcd6943961eb2455e3654dfdb1283b5
이 커밋은 다음에 포함됨:
1 부모
4455250be1
커밋
e6e66e8a05
2 파일이 변경됨
+23
-5
검색과 일치하는 파일 없음
@@ -1869,7 +1869,11 @@ hsa_status_t Runtime::GetSvmAttrib(void* ptr, size_t size,
|
||||
}
|
||||
}
|
||||
|
||||
if (getFlags) attribs.push_back(kmtPair(HSA_SVM_ATTR_SET_FLAGS, 0));
|
||||
if (getFlags) {
|
||||
// Order is important to later code.
|
||||
attribs.push_back(kmtPair(HSA_SVM_ATTR_CLR_FLAGS, 0));
|
||||
attribs.push_back(kmtPair(HSA_SVM_ATTR_SET_FLAGS, 0));
|
||||
}
|
||||
|
||||
uint8_t* base = AlignDown((uint8_t*)ptr, 4096);
|
||||
uint8_t* end = AlignUp((uint8_t*)ptr + size, 4096);
|
||||
@@ -1888,8 +1892,10 @@ hsa_status_t Runtime::GetSvmAttrib(void* ptr, size_t size,
|
||||
case HSA_AMD_SVM_ATTRIB_GLOBAL_FLAG: {
|
||||
if (attribs[attribs.size() - 1].value & HSA_SVM_FLAG_COHERENT)
|
||||
value = HSA_AMD_SVM_GLOBAL_FLAG_FINE_GRAINED;
|
||||
else
|
||||
if (attribs[attribs.size() - 2].value & HSA_SVM_FLAG_COHERENT)
|
||||
value = HSA_AMD_SVM_GLOBAL_FLAG_COARSE_GRAINED;
|
||||
else
|
||||
value = HSA_AMD_SVM_GLOBAL_FLAG_INDETERMINATE;
|
||||
break;
|
||||
}
|
||||
case HSA_AMD_SVM_ATTRIB_READ_ONLY: {
|
||||
|
||||
새 이슈에서 참조
사용자 차단