mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Disable state caching if used on regular cmd list
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
41a80072b9
commit
637c4e5621
@@ -400,7 +400,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendEventReset(ze_event_hand
|
||||
packetsToReset = event->getMaxPacketsCount();
|
||||
}
|
||||
event->resetPackets(false);
|
||||
event->resetCompletionStatus(true);
|
||||
event->disableHostCaching(this->cmdListType == CommandList::CommandListType::TYPE_REGULAR);
|
||||
commandContainer.addToResidencyContainer(&event->getAllocation(this->device));
|
||||
const auto &hwInfo = this->device->getHwInfo();
|
||||
if (isCopyOnly()) {
|
||||
|
||||
@@ -45,6 +45,7 @@ struct Event : _ze_event_handle_t {
|
||||
virtual ze_result_t queryTimestampsExp(Device *device, uint32_t *pCount, ze_kernel_timestamp_result_t *pTimestamps) = 0;
|
||||
enum State : uint32_t {
|
||||
STATE_SIGNALED = 0u,
|
||||
HOST_CACHING_DISABLED_PERMANENT = std::numeric_limits<uint32_t>::max() - 2,
|
||||
HOST_CACHING_DISABLED = std::numeric_limits<uint32_t>::max() - 1,
|
||||
STATE_CLEARED = std::numeric_limits<uint32_t>::max(),
|
||||
STATE_INITIAL = STATE_CLEARED
|
||||
@@ -122,12 +123,18 @@ struct Event : _ze_event_handle_t {
|
||||
l3FlushAppliedOnKernel.set(kernelCount - 1);
|
||||
}
|
||||
|
||||
void resetCompletionStatus(bool disableHostSideStatusCaching) {
|
||||
this->isCompleted.store(disableHostSideStatusCaching ? HOST_CACHING_DISABLED : STATE_CLEARED);
|
||||
void resetCompletionStatus() {
|
||||
if (this->isCompleted.load() != HOST_CACHING_DISABLED_PERMANENT) {
|
||||
this->isCompleted.store(STATE_CLEARED);
|
||||
}
|
||||
}
|
||||
|
||||
void disableHostCaching(bool disableFromRegularList) {
|
||||
this->isCompleted.store(disableFromRegularList ? HOST_CACHING_DISABLED_PERMANENT : HOST_CACHING_DISABLED);
|
||||
}
|
||||
|
||||
void setIsCompleted() {
|
||||
if (this->isCompleted.load() != HOST_CACHING_DISABLED) {
|
||||
if (this->isCompleted.load() == STATE_CLEARED) {
|
||||
this->isCompleted = STATE_SIGNALED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ ze_result_t EventImp<TagSizeT>::hostSynchronize(uint64_t timeout) {
|
||||
|
||||
template <typename TagSizeT>
|
||||
ze_result_t EventImp<TagSizeT>::reset() {
|
||||
this->resetCompletionStatus(false);
|
||||
this->resetCompletionStatus();
|
||||
this->resetDeviceCompletionData(false);
|
||||
this->l3FlushAppliedOnKernel.reset();
|
||||
return ZE_RESULT_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user