Correct Host Mem Capabilities values
Related-To: NEO-5054 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
parent
ceca8ab05e
commit
6a4ed40a16
|
@ -21,6 +21,7 @@
|
|||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/kernel/grf_config.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/os_interface/os_time.h"
|
||||
#include "shared/source/source_level_debugger/source_level_debugger.h"
|
||||
|
@ -275,8 +276,10 @@ ze_result_t DeviceImp::getMemoryProperties(uint32_t *pCount, ze_device_memory_pr
|
|||
}
|
||||
|
||||
ze_result_t DeviceImp::getMemoryAccessProperties(ze_device_memory_access_properties_t *pMemAccessProperties) {
|
||||
auto &hwInfo = this->getHwInfo();
|
||||
auto &hwInfoConfig = *NEO::HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
pMemAccessProperties->hostAllocCapabilities =
|
||||
ZE_MEMORY_ACCESS_CAP_FLAG_RW | ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC;
|
||||
static_cast<ze_memory_access_cap_flags_t>(hwInfoConfig.getHostMemCapabilities(&hwInfo));
|
||||
pMemAccessProperties->deviceAllocCapabilities =
|
||||
ZE_MEMORY_ACCESS_CAP_FLAG_RW | ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC;
|
||||
pMemAccessProperties->sharedSingleDeviceAllocCapabilities =
|
||||
|
|
|
@ -63,11 +63,6 @@ uint64_t HwInfoConfigHw<gfxProduct>::getSingleDeviceSharedMemCapabilities() {
|
|||
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
uint64_t HwInfoConfigHw<gfxProduct>::getHostMemCapabilitiesValue() {
|
||||
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::getHostMemCapabilitiesSupported(const HardwareInfo *hwInfo) {
|
||||
return true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -8,6 +8,12 @@
|
|||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
uint64_t HwInfoConfigHw<gfxProduct>::getHostMemCapabilitiesValue() {
|
||||
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
uint64_t HwInfoConfigHw<gfxProduct>::getCrossDeviceSharedMemCapabilities() {
|
||||
return 0;
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
constexpr uint64_t UNIFIED_SHARED_MEMORY_ACCESS = 1 << 0;
|
||||
|
|
Loading…
Reference in New Issue