mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 15:03:02 +08:00
Pass RootDeviceEnvironment instead of HwInfo
Pass RootDeviceEnvironment to GpgpuWalkerHelper::setupTimestampPacket, instead of HwInfo Related-To: NEO-4207 Change-Id: Ib4543bd167d0f8cadc1f0358e970a454d79b2d22 Signed-off-by: Swierczynski <andrzej.swierczynski@intel.com>
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
struct RootDeviceEnvironment;
|
||||
|
||||
template <typename GfxFamily>
|
||||
using WALKER_TYPE = typename GfxFamily::WALKER_TYPE;
|
||||
template <typename GfxFamily>
|
||||
@@ -134,7 +136,7 @@ class GpgpuWalkerHelper {
|
||||
WALKER_TYPE<GfxFamily> *walkerCmd,
|
||||
TagNode<TimestampPacketStorage> *timestampPacketNode,
|
||||
TimestampPacketStorage::WriteOperationType writeOperationType,
|
||||
const HardwareInfo &hwInfo);
|
||||
const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
|
||||
static void dispatchScheduler(
|
||||
LinearStream &commandStream,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "core/execution_environment/root_device_environment.h"
|
||||
#include "core/helpers/simd_helper.h"
|
||||
#include "runtime/command_queue/gpgpu_walker_base.inl"
|
||||
#include "runtime/device/cl_device.h"
|
||||
@@ -177,12 +178,12 @@ void GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(
|
||||
WALKER_TYPE<GfxFamily> *walkerCmd,
|
||||
TagNode<TimestampPacketStorage> *timestampPacketNode,
|
||||
TimestampPacketStorage::WriteOperationType writeOperationType,
|
||||
const HardwareInfo &hwInfo) {
|
||||
const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
|
||||
if (TimestampPacketStorage::WriteOperationType::AfterWalker == writeOperationType) {
|
||||
uint64_t address = timestampPacketNode->getGpuAddress() + offsetof(TimestampPacketStorage, packets[0].contextEnd);
|
||||
PipeControlHelper<GfxFamily>::obtainPipeControlAndProgramPostSyncOperation(*cmdStream,
|
||||
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA, address, 0, false, hwInfo);
|
||||
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA, address, 0, false, *rootDeviceEnvironment.getHardwareInfo());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ void HardwareInterface<GfxFamily>::dispatchKernelCommands(CommandQueue &commandQ
|
||||
|
||||
if (commandQueue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
|
||||
auto timestampPacketNode = currentTimestampPacketNodes->peekNodes().at(currentDispatchIndex);
|
||||
GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(&commandStream, nullptr, timestampPacketNode, TimestampPacketStorage::WriteOperationType::BeforeWalker, commandQueue.getDevice().getHardwareInfo());
|
||||
GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(&commandStream, nullptr, timestampPacketNode, TimestampPacketStorage::WriteOperationType::BeforeWalker, commandQueue.getDevice().getRootDeviceEnvironment());
|
||||
}
|
||||
|
||||
programWalker(commandStream, kernel, commandQueue, currentTimestampPacketNodes, dsh, ioh, ssh, globalWorkSizes,
|
||||
|
||||
@@ -111,7 +111,7 @@ inline void HardwareInterface<GfxFamily>::programWalker(
|
||||
|
||||
if (currentTimestampPacketNodes && commandQueue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
|
||||
auto timestampPacketNode = currentTimestampPacketNodes->peekNodes().at(currentDispatchIndex);
|
||||
GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(&commandStream, walkerCmd, timestampPacketNode, TimestampPacketStorage::WriteOperationType::AfterWalker, commandQueue.getDevice().getHardwareInfo());
|
||||
GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(&commandStream, walkerCmd, timestampPacketNode, TimestampPacketStorage::WriteOperationType::AfterWalker, commandQueue.getDevice().getRootDeviceEnvironment());
|
||||
}
|
||||
|
||||
auto isCcsUsed = EngineHelpers::isCcs(commandQueue.getGpgpuEngine().osContext->getEngineType());
|
||||
|
||||
Reference in New Issue
Block a user