refactor: move peer access handling to shared device

Related-To: NEO-14885, HSD-14024947073

Signed-off-by: Alicja Lukaszewicz <alicja.lukaszewicz@intel.com>
This commit is contained in:
Alicja Lukaszewicz
2025-08-18 13:42:17 +00:00
committed by Compute-Runtime-Automation
parent 43d4264047
commit 0335d44a56
10 changed files with 260 additions and 158 deletions

View File

@@ -91,6 +91,8 @@ struct RTDispatchGlobalsInfo {
std::vector<GraphicsAllocation *> rtStacks; // per tile
};
using QueryPeerAccessFunc = std::function<bool(Device &, Device &, bool &)>;
class Device : public ReferenceTrackedObject<Device>, NEO::NonCopyableAndNonMovableClass {
public:
~Device() override;
@@ -260,6 +262,9 @@ class Device : public ReferenceTrackedObject<Device>, NEO::NonCopyableAndNonMova
void resetUsmAllocationPool(UsmMemAllocPool *usmMemAllocPool);
void cleanupUsmAllocationPool();
std::unordered_map<uint32_t, bool> crossAccessEnabledDevices;
bool canAccessPeer(QueryPeerAccessFunc queryPeerAccess, Device *peerDevice, bool &canAccess);
protected:
Device() = delete;
Device(ExecutionEnvironment *executionEnvironment, const uint32_t rootDeviceIndex);