Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions projects/clr/rocclr/device/pal/paldevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,10 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
info_.aqlBarrierValue_ = true;

#if defined(_WIN64)
if (amd::IS_HIP) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a reason why large bar was disabled at least on dgpu systems, because HIP expects CPU access to the device memory, but in Windows it's not possible. We may have regressions after this change or extra fixes in the tests.

info_.largeBar_ = false;
} else if (heaps[Pal::GpuHeapInvisible].logicalSize == 0) {
// For APU/integrated devices (no invisible/private VRAM heap), treat as large bar.
// This applies to both HIP and OpenCL: on UMA systems the entire system memory is
// GPU-local, so resizable BAR semantics apply.
if (heaps[Pal::GpuHeapInvisible].logicalSize == 0) {
info_.largeBar_ = true;
ClPrint(amd::LOG_INFO, amd::LOG_INIT, "Resizable bar enabled");
}
Expand Down
5 changes: 4 additions & 1 deletion projects/clr/rocclr/device/pal/palmemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ bool Memory::create(Resource::MemoryType memType, Resource::CreateParams* params
memType = Persistent;
}

if (amd::IS_HIP && dev().settings().apuSystem_) {
if (amd::IS_HIP && dev().settings().apuSystem_ && !dev().info().largeBar_) {
// For large-bar APU (UMA, no invisible heap), skip the premature redirect to
// RemoteUSWC: the retry loop below will naturally fall through Local ->
// Persistent -> RemoteUSWC, avoiding the Windows GART 50%-of-RAM cap.
Pal::gpusize totalAlloc = dev().TotalAlloc();
if (memType == Local && totalAlloc > dev().GetMaxFrameBuffer()) {
memType = RemoteUSWC;
Expand Down
Loading