Skip to content

Commit

Permalink
Fixes for BDW device enqueue
Browse files Browse the repository at this point in the history
- add DC Flush to PipeControl with CSStall
- fix SLB SPACE_FOR_EACH_ENQUEUE size for gen8

Change-Id: Ida6ced371e86ff0f8c1b23f08e64fa73530e37b1
  • Loading branch information
HoppeMateusz authored and Compute-Runtime-Automation committed May 30, 2018
1 parent 1e045e3 commit 9a7e57d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions runtime/device_queue/device_queue_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class DeviceQueueHw : public DeviceQueue {
void addPipeControlCmdWa(bool isNoopCmd = false);
void initPipeControl(PIPE_CONTROL *pc);
void buildSlbDummyCommands();
void addDcFlushToPipeControlWa(PIPE_CONTROL *pc);

void addProfilingEndCmds(uint64_t timestampAddress);
static size_t getProfilingEndCmdsSize();
Expand Down
5 changes: 5 additions & 0 deletions runtime/device_queue/device_queue_hw.inl
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ void DeviceQueueHw<GfxFamily>::addMediaStateClearCmds() {
pipeControl->setGenericMediaStateClear(true);
pipeControl->setCommandStreamerStallEnable(true);

addDcFlushToPipeControlWa(pipeControl);

PreambleHelper<GfxFamily>::programVFEState(&slbCS, device->getHardwareInfo(), 0, 0);
}

Expand Down Expand Up @@ -471,4 +473,7 @@ size_t DeviceQueueHw<GfxFamily>::getProfilingEndCmdsSize() {
return size;
}

template <typename GfxFamily>
void DeviceQueueHw<GfxFamily>::addDcFlushToPipeControlWa(PIPE_CONTROL *pc) {}

} // namespace OCLRT
2 changes: 1 addition & 1 deletion runtime/gen8/device_enqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

#ifdef WA_LRI_COMMANDS_EXIST_GEN8

#define SECOND_LEVEL_BUFFER_SPACE_FOR_EACH_ENQUEUE_GEN8PLUS (OCLRT_SIZEOF_MEDIA_STATE_FLUSH + OCLRT_SIZEOF_MI_ATOMIC_CMD + OCLRT_SIZEOF_MEDIA_VFE_STATE_CMD + OCLRT_SIZEOF_MEDIA_INTERFACE_DESCRIPTOR_LOAD_DEVICE_CMD + OCLRT_LOAD_REGISTER_IMM_CMD_G8 + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G8 + OCLRT_GPGPU_WALKER_CMD_DEVICE_CMD_G8 + OCLRT_SIZEOF_MEDIA_STATE_FLUSH + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G8 + OCLRT_LOAD_REGISTER_IMM_CMD_G8 + CS_PREFETCH_SIZE)
#define SECOND_LEVEL_BUFFER_SPACE_FOR_EACH_ENQUEUE_GEN8PLUS (OCLRT_SIZEOF_MEDIA_STATE_FLUSH + OCLRT_SIZEOF_MI_ATOMIC_CMD + OCLRT_SIZEOF_MEDIA_INTERFACE_DESCRIPTOR_LOAD_DEVICE_CMD + OCLRT_LOAD_REGISTER_IMM_CMD_G8 + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G8 + OCLRT_GPGPU_WALKER_CMD_DEVICE_CMD_G8 + OCLRT_SIZEOF_MEDIA_STATE_FLUSH + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G8 + OCLRT_LOAD_REGISTER_IMM_CMD_G8 + CS_PREFETCH_SIZE)

#else

Expand Down
5 changes: 5 additions & 0 deletions runtime/gen8/device_queue_gen8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,10 @@ void DeviceQueueHw<Family>::addProfilingEndCmds(uint64_t timestampAddress) {
pPipeControlCmd->setAddress(timestampAddress & (0xffffffff));
}

template <>
void DeviceQueueHw<Family>::addDcFlushToPipeControlWa(PIPE_CONTROL *pc) {
pc->setDcFlushEnable(true);
}

template class DeviceQueueHw<Family>;
} // namespace OCLRT

0 comments on commit 9a7e57d

Please sign in to comment.