libhsakmt: Set CWSR range granularity
Set CWSR svm range granularity to 0xff, then KFD will migrate the entire CWSR range from VRAM back to system memory when recovering the CPU page fault if rocgdb access CWSR area, this avoid the partial CWSR range migration and stall CWSR GPU mapping issue. This is a temporary workaround, it should be reverted once the KFD is fixed. Change-Id: I80a7248244574edba25b13858b7ebcf1c77b8930 Signed-off-by: Philip Yang <Philip.Yang@amd.com>
This commit is contained in:
+3
-1
@@ -413,7 +413,7 @@ static HSAKMT_STATUS register_svm_range(void *mem, uint32_t size,
|
||||
flags |= HSA_SVM_FLAG_GPU_ALWAYS_MAPPED;
|
||||
}
|
||||
|
||||
nattr = 5;
|
||||
nattr = 6;
|
||||
s_attr = sizeof(*attrs) * nattr;
|
||||
attrs = (HSA_SVM_ATTRIBUTE *)alloca(s_attr);
|
||||
|
||||
@@ -427,6 +427,8 @@ static HSAKMT_STATUS register_svm_range(void *mem, uint32_t size,
|
||||
attrs[3].value = flags;
|
||||
attrs[4].type = HSA_SVM_ATTR_ACCESS;
|
||||
attrs[4].value = gpuNode;
|
||||
attrs[5].type = HSA_SVM_ATTR_GRANULARITY;
|
||||
attrs[5].value = 0xFF;
|
||||
|
||||
return hsaKmtSVMSetAttr(mem, size, nattr, attrs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user