Do not report reserved scratch cache as available
Scratch cache reserved memory is only available for scratch memory use
so do not report this memory as available to the user via the
HSA_AMD_AGENT_INFO_MEMORY_AVAIL api.
Change-Id: I52f96e62536458bcaa52b9f4be5de856d5680dc4
[ROCm/ROCR-Runtime commit: 3477fbc661]
このコミットが含まれているのは:
1 親
e1ded285a9
コミット
2d924e337d
2ファイル変更
+2
-1
検索条件に一致するファイルはありません
@@ -195,6 +195,7 @@ class ScratchCache {
|
||||
}
|
||||
|
||||
size_t free_bytes() const { return available_bytes_; }
|
||||
size_t reserved_bytes() const { return reserved_.first; }
|
||||
|
||||
void reserve(size_t bytes, void* base) {
|
||||
assert(!reserved_.first && "Already reserved memory.");
|
||||
|
||||
@@ -1231,7 +1231,7 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
|
||||
|
||||
for (auto r : regions()) availableBytes += ((AMD::MemoryRegion*)r)->GetCacheSize();
|
||||
|
||||
availableBytes += scratch_cache_.free_bytes();
|
||||
availableBytes += scratch_cache_.free_bytes() - scratch_cache_.reserved_bytes();
|
||||
|
||||
*((uint64_t*)value) = availableBytes;
|
||||
break;
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする