Add isResumeWARequired()

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2021-07-20 16:16:17 +00:00
committed by Compute-Runtime-Automation
parent 4dbcb6a16b
commit 8d22247ff2
6 changed files with 56 additions and 3 deletions

View File

@@ -22,6 +22,11 @@ void populateFactoryTable<L0HwHelperHw<Family>>() {
l0HwHelperFactory[gfxCore] = &L0HwHelperHw<Family>::get();
}
template <>
bool L0HwHelperHw<Family>::isResumeWARequired() {
return true;
}
template class L0HwHelperHw<Family>;
} // namespace L0

View File

@@ -24,6 +24,8 @@ class L0HwHelper {
virtual void setAdditionalGroupProperty(ze_command_queue_group_properties_t &groupProperty, uint32_t groupType) const = 0;
virtual L0::Event *createEvent(L0::EventPool *eventPool, const ze_event_desc_t *desc, L0::Device *device) const = 0;
virtual bool isResumeWARequired() = 0;
protected:
L0HwHelper() = default;
};
@@ -38,6 +40,8 @@ class L0HwHelperHw : public L0HwHelper {
void setAdditionalGroupProperty(ze_command_queue_group_properties_t &groupProperty, uint32_t groupType) const override;
L0::Event *createEvent(L0::EventPool *eventPool, const ze_event_desc_t *desc, L0::Device *device) const override;
L0HwHelperHw() = default;
bool isResumeWARequired() override;
};
} // namespace L0

View File

@@ -13,8 +13,8 @@
namespace L0 {
template <typename Family>
L0::Event *L0HwHelperHw<Family>::createEvent(L0::EventPool *eventPool, const ze_event_desc_t *desc, L0::Device *device) const {
template <typename GfxFamily>
L0::Event *L0HwHelperHw<GfxFamily>::createEvent(L0::EventPool *eventPool, const ze_event_desc_t *desc, L0::Device *device) const {
if (NEO::DebugManager.flags.OverrideTimestampPacketSize.get() != -1) {
if (NEO::DebugManager.flags.OverrideTimestampPacketSize.get() == 4) {
return Event::create<uint32_t>(eventPool, desc, device);
@@ -25,7 +25,11 @@ L0::Event *L0HwHelperHw<Family>::createEvent(L0::EventPool *eventPool, const ze_
}
}
return Event::create<typename Family::TimestampPacketType>(eventPool, desc, device);
return Event::create<typename GfxFamily::TimestampPacketType>(eventPool, desc, device);
}
template <typename GfxFamily>
bool L0HwHelperHw<GfxFamily>::isResumeWARequired() {
return false;
}
} // namespace L0

View File

@@ -22,6 +22,11 @@ void populateFactoryTable<L0HwHelperHw<Family>>() {
l0HwHelperFactory[gfxCore] = &L0HwHelperHw<Family>::get();
}
template <>
bool L0HwHelperHw<Family>::isResumeWARequired() {
return true;
}
template class L0HwHelperHw<Family>;
} // namespace L0