diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp index 2d36aa0290..a03c69f90b 100644 --- a/rocclr/runtime/device/pal/paldevice.cpp +++ b/rocclr/runtime/device/pal/paldevice.cpp @@ -177,8 +177,10 @@ NullDevice::create(Pal::AsicRevision asicRevision, Pal::GfxIpLevel ipLevel) Pal::GpuMemoryHeapProperties heaps[Pal::GpuHeapCount]; heaps[Pal::GpuHeapLocal].heapSize = 512 * Mi; + Pal::WorkStationCaps wscaps = {}; + // Create setting for the offline target - if ((palSettings == nullptr) || !palSettings->create(properties, heaps)) { + if ((palSettings == nullptr) || !palSettings->create(properties, heaps, wscaps)) { return false; } @@ -763,11 +765,14 @@ Device::create(Pal::IDevice* device) Pal::GpuMemoryHeapProperties heaps[Pal::GpuHeapCount]; iDev()->GetGpuMemoryHeapProperties(heaps); + Pal::WorkStationCaps wscaps = {}; + iDev()->QueryWorkStationCaps(&wscaps); + // Creates device settings settings_ = new pal::Settings(); pal::Settings* gpuSettings = reinterpret_cast(settings_); if ((gpuSettings == nullptr) || !gpuSettings->create(properties(), heaps, - appProfile_.reportAsOCL12Device())) { + wscaps, appProfile_.reportAsOCL12Device())) { return false; } numComputeEngines_ = std::min(numComputeEngines_, settings().numComputeRings_); diff --git a/rocclr/runtime/device/pal/palsettings.cpp b/rocclr/runtime/device/pal/palsettings.cpp index 7df2023cbb..7aa4080150 100644 --- a/rocclr/runtime/device/pal/palsettings.cpp +++ b/rocclr/runtime/device/pal/palsettings.cpp @@ -141,6 +141,7 @@ bool Settings::create( const Pal::DeviceProperties& palProp, const Pal::GpuMemoryHeapProperties* heaps, + const Pal::WorkStationCaps& wscaps, bool reportAsOCL12Device ) { @@ -257,7 +258,7 @@ Settings::create( supportDepthsRGB_ = true; } if (use64BitPtr_) { - if (GPU_ENABLE_LARGE_ALLOCATION /*&& calAttr.isWorkstation*/) { + if (GPU_ENABLE_LARGE_ALLOCATION && wscaps.workStationBoard) { maxAllocSize_ = 64ULL * Gi; } else { diff --git a/rocclr/runtime/device/pal/palsettings.hpp b/rocclr/runtime/device/pal/palsettings.hpp index bf7c4ca221..c8e33b94fb 100644 --- a/rocclr/runtime/device/pal/palsettings.hpp +++ b/rocclr/runtime/device/pal/palsettings.hpp @@ -105,6 +105,7 @@ public: bool create( const Pal::DeviceProperties& palProp, //!< PAL device properties const Pal::GpuMemoryHeapProperties* heaps, //!< PAL heap settings + const Pal::WorkStationCaps& wscaps, //!< PAL workstation settings bool reportAsOCL12Device = false //!< Report As OpenCL1.2 Device );