diff --git a/level_zero/core/source/event/event.cpp b/level_zero/core/source/event/event.cpp index c96b726f31..d1913bfd39 100644 --- a/level_zero/core/source/event/event.cpp +++ b/level_zero/core/source/event/event.cpp @@ -15,6 +15,7 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/constants.h" +#include "shared/source/helpers/device_bitfield.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/string.h" #include "shared/source/memory_manager/allocation_properties.h" @@ -141,7 +142,7 @@ ze_result_t EventPool::initialize(DriverHandle *driver, Context *context, uint32 } } else { this->isHostVisibleEventPoolAllocation = true; - NEO::AllocationProperties allocationProperties{*rootDeviceIndices.begin(), this->eventPoolSize, allocationType, systemMemoryBitfield}; + NEO::AllocationProperties allocationProperties{*rootDeviceIndices.begin(), this->eventPoolSize, allocationType, NEO::systemMemoryBitfield}; allocationProperties.alignment = eventAlignment; eventPoolPtr = driver->getMemoryManager()->createMultiGraphicsAllocationInSystemMemoryPool(rootDeviceIndices, @@ -293,7 +294,7 @@ ze_result_t Event::openCounterBasedIpcHandle(const IpcCounterBasedEventData &ipc NEO::MemoryManager::OsHandleData deviceOsHandleData{ipcData.deviceHandle}; NEO::MemoryManager::OsHandleData hostOsHandleData{ipcData.hostHandle}; - NEO::AllocationProperties unifiedMemoryProperties{ipcData.rootDeviceIndex, MemoryConstants::pageSize64k, NEO::DeviceAllocNodeType::getAllocationType(), systemMemoryBitfield}; + NEO::AllocationProperties unifiedMemoryProperties{ipcData.rootDeviceIndex, MemoryConstants::pageSize64k, NEO::DeviceAllocNodeType::getAllocationType(), NEO::systemMemoryBitfield}; unifiedMemoryProperties.subDevicesBitfield = neoDevice->getDeviceBitfield(); auto *deviceAlloc = memoryManager->createGraphicsAllocationFromSharedHandle(deviceOsHandleData, unifiedMemoryProperties, false, (ipcData.hostHandle == 0), false, nullptr); @@ -475,7 +476,7 @@ ze_result_t EventPool::openEventPoolIpcHandle(const ze_ipc_event_pool_handle_t & NEO::AllocationProperties unifiedMemoryProperties{poolData.rootDeviceIndex, eventPool->getEventPoolSize(), allocationType, - systemMemoryBitfield}; + NEO::systemMemoryBitfield}; unifiedMemoryProperties.subDevicesBitfield = neoDevice->getDeviceBitfield(); auto memoryManager = driver->getMemoryManager(); diff --git a/shared/source/command_stream/command_stream_receiver.h b/shared/source/command_stream/command_stream_receiver.h index 25eeb759e6..95073c5266 100644 --- a/shared/source/command_stream/command_stream_receiver.h +++ b/shared/source/command_stream/command_stream_receiver.h @@ -15,6 +15,7 @@ #include "shared/source/helpers/cache_policy.h" #include "shared/source/helpers/common_types.h" #include "shared/source/helpers/completion_stamp.h" +#include "shared/source/helpers/device_bitfield.h" #include "shared/source/helpers/kmd_notify_properties.h" #include "shared/source/helpers/non_copyable_or_moveable.h" #include "shared/source/helpers/options.h" diff --git a/shared/source/helpers/constants.h b/shared/source/helpers/constants.h index 3ba5312b5d..657e3a04c4 100644 --- a/shared/source/helpers/constants.h +++ b/shared/source/helpers/constants.h @@ -7,16 +7,14 @@ #pragma once #include "shared/source/helpers/definitions/engine_group_types.h" -#include "shared/source/helpers/device_bitfield.h" +#include #include #include inline constexpr bool is32bit = (sizeof(void *) == 4); inline constexpr bool is64bit = (sizeof(void *) == 8); -inline constexpr NEO::DeviceBitfield systemMemoryBitfield(0b0); - constexpr uint64_t maxNBitValue(uint64_t n) { return ((n == 64) ? std::numeric_limits::max() : ((1ULL << n) - 1)); diff --git a/shared/source/helpers/device_bitfield.h b/shared/source/helpers/device_bitfield.h index 9b2b848462..d87c3c10cd 100644 --- a/shared/source/helpers/device_bitfield.h +++ b/shared/source/helpers/device_bitfield.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,4 +12,6 @@ namespace NEO { using DeviceBitfield = std::bitset<4>; +inline constexpr DeviceBitfield systemMemoryBitfield(0b0); + } // namespace NEO \ No newline at end of file diff --git a/shared/source/memory_manager/allocation_properties.h b/shared/source/memory_manager/allocation_properties.h index 43c39936f5..10ab0e403c 100644 --- a/shared/source/memory_manager/allocation_properties.h +++ b/shared/source/memory_manager/allocation_properties.h @@ -6,6 +6,7 @@ */ #pragma once +#include "shared/source/helpers/device_bitfield.h" #include "shared/source/memory_manager/graphics_allocation.h" namespace NEO { diff --git a/shared/source/memory_manager/definitions/storage_info.h b/shared/source/memory_manager/definitions/storage_info.h index 2be5c7f558..b79023d40f 100644 --- a/shared/source/memory_manager/definitions/storage_info.h +++ b/shared/source/memory_manager/definitions/storage_info.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2024 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,6 +9,7 @@ #include "shared/source/helpers/app_resource_defines.h" #include "shared/source/helpers/common_types.h" #include "shared/source/helpers/constants.h" +#include "shared/source/helpers/device_bitfield.h" #include diff --git a/shared/source/utilities/staging_buffer_manager.h b/shared/source/utilities/staging_buffer_manager.h index c7e640f102..cbed7d7733 100644 --- a/shared/source/utilities/staging_buffer_manager.h +++ b/shared/source/utilities/staging_buffer_manager.h @@ -9,6 +9,7 @@ #include "shared/source/command_stream/wait_status.h" #include "shared/source/helpers/constants.h" +#include "shared/source/helpers/device_bitfield.h" #include "shared/source/helpers/non_copyable_or_moveable.h" #include "shared/source/utilities/stackvec.h"