mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 22:08:53 +08:00
Optimize number of calls for pipe control post syncs
Related-To: NEO-6262 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
620484010d
commit
78609cd9f5
@@ -119,17 +119,6 @@ EngineGroupType HwHelperHw<Family>::getEngineGroupType(aub_stream::EngineType en
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
|
||||||
void MemorySynchronizationCommands<Family>::setPipeControlWA(void *&commandsBuffer, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
|
||||||
if (HwInfoConfig::get(hwInfo.platform.eProductFamily)->pipeControlWARequired(hwInfo)) {
|
|
||||||
PIPE_CONTROL cmd = Family::cmdInitPipeControl;
|
|
||||||
|
|
||||||
cmd.setCommandStreamerStallEnable(true);
|
|
||||||
*reinterpret_cast<PIPE_CONTROL *>(commandsBuffer) = cmd;
|
|
||||||
commandsBuffer = ptrOffset(commandsBuffer, sizeof(PIPE_CONTROL));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
std::string HwHelperHw<Family>::getExtensions() const {
|
std::string HwHelperHw<Family>::getExtensions() const {
|
||||||
return "cl_intel_subgroup_local_block_io ";
|
return "cl_intel_subgroup_local_block_io ";
|
||||||
|
|||||||
@@ -24,15 +24,6 @@ SipKernelType HwHelperHw<Family>::getSipKernelType(bool debuggingActive) const {
|
|||||||
return DebugManager.flags.UseBindlessDebugSip.get() ? SipKernelType::DbgBindless : SipKernelType::DbgCsrLocal;
|
return DebugManager.flags.UseBindlessDebugSip.get() ? SipKernelType::DbgBindless : SipKernelType::DbgCsrLocal;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
|
||||||
void MemorySynchronizationCommands<Family>::setPipeControlWA(void *&commandsBuffer, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
|
||||||
PIPE_CONTROL cmd = Family::cmdInitPipeControl;
|
|
||||||
|
|
||||||
cmd.setCommandStreamerStallEnable(true);
|
|
||||||
*reinterpret_cast<PIPE_CONTROL *>(commandsBuffer) = cmd;
|
|
||||||
commandsBuffer = ptrOffset(commandsBuffer, sizeof(PIPE_CONTROL));
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t HwHelperHw<Family>::getMetricsLibraryGenId() const {
|
uint32_t HwHelperHw<Family>::getMetricsLibraryGenId() const {
|
||||||
return static_cast<uint32_t>(MetricsLibraryApi::ClientGen::Gen9);
|
return static_cast<uint32_t>(MetricsLibraryApi::ClientGen::Gen9);
|
||||||
|
|||||||
@@ -436,7 +436,7 @@ struct MemorySynchronizationCommands {
|
|||||||
PipeControlArgs &args);
|
PipeControlArgs &args);
|
||||||
|
|
||||||
static void setPostSyncExtraProperties(PipeControlArgs &args, const HardwareInfo &hwInfo);
|
static void setPostSyncExtraProperties(PipeControlArgs &args, const HardwareInfo &hwInfo);
|
||||||
static void setPipeControl(PIPE_CONTROL &pipeControl, PipeControlArgs &args);
|
static void setPipeControlWAFlags(PIPE_CONTROL &pipeControl);
|
||||||
|
|
||||||
static void addPipeControlWA(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo);
|
static void addPipeControlWA(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo);
|
||||||
static void setPipeControlWA(void *&commandsBuffer, uint64_t gpuAddress, const HardwareInfo &hwInfo);
|
static void setPipeControlWA(void *&commandsBuffer, uint64_t gpuAddress, const HardwareInfo &hwInfo);
|
||||||
@@ -445,6 +445,8 @@ struct MemorySynchronizationCommands {
|
|||||||
static void setAdditionalSynchronization(void *&commandsBuffer, uint64_t gpuAddress, const HardwareInfo &hwInfo);
|
static void setAdditionalSynchronization(void *&commandsBuffer, uint64_t gpuAddress, const HardwareInfo &hwInfo);
|
||||||
|
|
||||||
static void addPipeControl(LinearStream &commandStream, PipeControlArgs &args);
|
static void addPipeControl(LinearStream &commandStream, PipeControlArgs &args);
|
||||||
|
static void setPipeControl(PIPE_CONTROL &pipeControl, PipeControlArgs &args);
|
||||||
|
|
||||||
static void addPipeControlWithCSStallOnly(LinearStream &commandStream);
|
static void addPipeControlWithCSStallOnly(LinearStream &commandStream);
|
||||||
|
|
||||||
static bool isDcFlushAllowed();
|
static bool isDcFlushAllowed();
|
||||||
|
|||||||
@@ -277,14 +277,27 @@ void MemorySynchronizationCommands<GfxFamily>::addPipeControlWithPostSync(
|
|||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void MemorySynchronizationCommands<GfxFamily>::addPipeControlWA(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
void MemorySynchronizationCommands<GfxFamily>::addPipeControlWA(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
||||||
size_t requiredSize = MemorySynchronizationCommands<GfxFamily>::getSizeForPipeControlWA(hwInfo);
|
size_t requiredSize = MemorySynchronizationCommands<GfxFamily>::getSizeForPipeControlWA(hwInfo);
|
||||||
if (requiredSize > 0) {
|
void *commandBuffer = commandStream.getSpace(requiredSize);
|
||||||
void *commandBuffer = commandStream.getSpace(requiredSize);
|
setPipeControlWA(commandBuffer, gpuAddress, hwInfo);
|
||||||
setPipeControlWA(commandBuffer, gpuAddress, hwInfo);
|
}
|
||||||
|
|
||||||
|
template <typename GfxFamily>
|
||||||
|
void MemorySynchronizationCommands<GfxFamily>::setPipeControlWA(void *&commandsBuffer, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
||||||
|
if (MemorySynchronizationCommands<GfxFamily>::isPipeControlWArequired(hwInfo)) {
|
||||||
|
PIPE_CONTROL cmd = GfxFamily::cmdInitPipeControl;
|
||||||
|
MemorySynchronizationCommands<GfxFamily>::setPipeControlWAFlags(cmd);
|
||||||
|
*reinterpret_cast<PIPE_CONTROL *>(commandsBuffer) = cmd;
|
||||||
|
commandsBuffer = ptrOffset(commandsBuffer, sizeof(PIPE_CONTROL));
|
||||||
|
|
||||||
|
MemorySynchronizationCommands<GfxFamily>::setAdditionalSynchronization(commandsBuffer, gpuAddress, hwInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void MemorySynchronizationCommands<GfxFamily>::addAdditionalSynchronization(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
void MemorySynchronizationCommands<GfxFamily>::addAdditionalSynchronization(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
||||||
|
size_t requiredSize = MemorySynchronizationCommands<GfxFamily>::getSizeForSingleAdditionalSynchronization(hwInfo);
|
||||||
|
void *commandBuffer = commandStream.getSpace(requiredSize);
|
||||||
|
setAdditionalSynchronization(commandBuffer, gpuAddress, hwInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
|
|||||||
@@ -100,10 +100,6 @@ aub_stream::MMIOList HwHelperHw<GfxFamily>::getExtraMmioList(const HardwareInfo
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
|
||||||
inline void MemorySynchronizationCommands<GfxFamily>::setPipeControlWA(void *&commandsBuffer, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
inline void MemorySynchronizationCommands<GfxFamily>::setPostSyncExtraProperties(PipeControlArgs &args, const HardwareInfo &hwInfo) {
|
inline void MemorySynchronizationCommands<GfxFamily>::setPostSyncExtraProperties(PipeControlArgs &args, const HardwareInfo &hwInfo) {
|
||||||
}
|
}
|
||||||
@@ -119,6 +115,11 @@ inline void MemorySynchronizationCommands<GfxFamily>::setPipeControlExtraPropert
|
|||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
bool MemorySynchronizationCommands<GfxFamily>::isPipeControlWArequired(const HardwareInfo &hwInfo) { return false; }
|
bool MemorySynchronizationCommands<GfxFamily>::isPipeControlWArequired(const HardwareInfo &hwInfo) { return false; }
|
||||||
|
|
||||||
|
template <typename GfxFamily>
|
||||||
|
inline void MemorySynchronizationCommands<GfxFamily>::setPipeControlWAFlags(PIPE_CONTROL &pipeControl) {
|
||||||
|
pipeControl.setCommandStreamerStallEnable(true);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
bool HwHelperHw<GfxFamily>::additionalPipeControlArgsRequired() const {
|
bool HwHelperHw<GfxFamily>::additionalPipeControlArgsRequired() const {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -118,16 +118,9 @@ std::string HwHelperHw<Family>::getExtensions() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void MemorySynchronizationCommands<Family>::setPipeControlWA(void *&commandsBuffer, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
void MemorySynchronizationCommands<Family>::setPipeControlWAFlags(PIPE_CONTROL &pipeControl) {
|
||||||
if (DebugManager.flags.DisablePipeControlPrecedingPostSyncCommand.get() == 1) {
|
pipeControl.setCommandStreamerStallEnable(true);
|
||||||
if (hwInfo.featureTable.ftrLocalMemory) {
|
pipeControl.setHdcPipelineFlush(true);
|
||||||
PIPE_CONTROL cmd = Family::cmdInitPipeControl;
|
|
||||||
cmd.setCommandStreamerStallEnable(true);
|
|
||||||
cmd.setHdcPipelineFlush(true);
|
|
||||||
*reinterpret_cast<PIPE_CONTROL *>(commandsBuffer) = cmd;
|
|
||||||
commandsBuffer = ptrOffset(commandsBuffer, sizeof(PIPE_CONTROL));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
|||||||
Reference in New Issue
Block a user