Return true in Device::isSimulation() when AUB or TBX CSR is selected

- when CSR is set to AUB or TBX (with AubDump) Device should
return true in isSimulation(). This method is used to set flag
m_IsSimulation in deviceQueue which is used by scheduler kernel

Change-Id: Ibdf07d4c940335fb0bb8448071b66d47e9391d71
This commit is contained in:
Hoppe, Mateusz
2018-06-06 10:34:51 +02:00
committed by sys_ocldev
parent a3e97e8cc3
commit a9566e0c05
11 changed files with 98 additions and 1 deletions

View File

@@ -93,5 +93,9 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverHw<GfxFamily> {
uint32_t getGUCWorkQueueItemHeader(EngineType engineType);
uint64_t getPPGTTAdditionalBits(GraphicsAllocation *gfxAllocation);
void getGTTData(void *memory, AubGTTData &data);
CommandStreamReceiverType getType() override {
return CommandStreamReceiverType::CSR_AUB;
}
};
} // namespace OCLRT

View File

@@ -27,6 +27,7 @@
#include "runtime/helpers/completion_stamp.h"
#include "runtime/helpers/aligned_memory.h"
#include "runtime/helpers/address_patch.h"
#include "runtime/helpers/options.h"
#include "runtime/indirect_heap/indirect_heap.h"
#include "runtime/helpers/flat_batch_buffer_helper.h"
#include "runtime/command_stream/csr_definitions.h"
@@ -133,6 +134,8 @@ class CommandStreamReceiver {
void allocateHeapMemory(IndirectHeap::Type heapType, size_t minRequiredSize, IndirectHeap *&indirectHeap);
void releaseIndirectHeap(IndirectHeap::Type heapType);
virtual enum CommandStreamReceiverType getType() = 0;
protected:
void setDisableL3Cache(bool val) {
disableL3Cache = val;

View File

@@ -81,6 +81,10 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
void resetKmdNotifyHelper(KmdNotifyHelper *newHelper);
CommandStreamReceiverType getType() override {
return CommandStreamReceiverType::CSR_HW;
}
protected:
void programPreemption(LinearStream &csr, DispatchFlags &dispatchFlags);
void programL3(LinearStream &csr, DispatchFlags &dispatchFlags, uint32_t &newL3Config);

View File

@@ -93,5 +93,9 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverHw<GfxFamily> {
PDPE ggtt;
// remap CPU VA -> GGTT VA
AddressMapper gttRemap;
CommandStreamReceiverType getType() override {
return CommandStreamReceiverType::CSR_TBX;
}
};
} // namespace OCLRT

View File

@@ -273,7 +273,11 @@ unique_ptr_if_unused<Device> Device::release() {
}
bool Device::isSimulation() {
return hwInfo.capabilityTable.isSimulation(hwInfo.pPlatform->usDeviceID);
bool simulation = hwInfo.capabilityTable.isSimulation(hwInfo.pPlatform->usDeviceID);
if (commandStreamReceiver->getType() != CommandStreamReceiverType::CSR_HW) {
simulation = true;
}
return simulation;
}
double Device::getPlatformHostTimerResolution() const {