mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Force lowest NumberOfCCSEnabled in ULTs
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
e295e74c0a
commit
a4f1cf14fb
@ -931,7 +931,10 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleWh
|
||||
typedef typename FamilyType::MI_BATCH_BUFFER_START MI_BATCH_BUFFER_START;
|
||||
typedef typename FamilyType::MI_BATCH_BUFFER_END MI_BATCH_BUFFER_END;
|
||||
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
hardwareInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 1;
|
||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo, 0u));
|
||||
auto &commandStreamReceiver = mockDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
commandStreamReceiver.timestampPacketWriteEnabled = false;
|
||||
// Force a PIPE_CONTROL through a taskLevel transition
|
||||
taskLevel = commandStreamReceiver.peekTaskLevel() + 1;
|
||||
@ -941,8 +944,8 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleWh
|
||||
commandStreamReceiver.lastSentL3Config = l3Config;
|
||||
|
||||
auto &csrCS = commandStreamReceiver.getCS();
|
||||
size_t sizeNeededForPreamble = commandStreamReceiver.getRequiredCmdSizeForPreamble(*pDevice);
|
||||
size_t sizeNeeded = commandStreamReceiver.getRequiredCmdStreamSize(flushTaskFlags, *pDevice);
|
||||
size_t sizeNeededForPreamble = commandStreamReceiver.getRequiredCmdSizeForPreamble(*mockDevice);
|
||||
size_t sizeNeeded = commandStreamReceiver.getRequiredCmdStreamSize(flushTaskFlags, *mockDevice);
|
||||
sizeNeeded -= sizeof(MI_BATCH_BUFFER_START); // no task to submit
|
||||
sizeNeeded += sizeof(MI_BATCH_BUFFER_END); // no task to submit, add BBE to CSR stream
|
||||
sizeNeeded = alignUp(sizeNeeded, MemoryConstants::cacheLineSize);
|
||||
@ -960,19 +963,22 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleAn
|
||||
typedef typename FamilyType::MI_BATCH_BUFFER_START MI_BATCH_BUFFER_START;
|
||||
typedef typename FamilyType::MI_BATCH_BUFFER_END MI_BATCH_BUFFER_END;
|
||||
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
hardwareInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 1;
|
||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo, 0u));
|
||||
auto &commandStreamReceiver = mockDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
commandStreamReceiver.timestampPacketWriteEnabled = false;
|
||||
// Force a PIPE_CONTROL through a taskLevel transition
|
||||
taskLevel = commandStreamReceiver.peekTaskLevel() + 1;
|
||||
commandStreamReceiver.lastSentCoherencyRequest = 0;
|
||||
|
||||
auto l3Config = PreambleHelper<FamilyType>::getL3Config(pDevice->getHardwareInfo(), false);
|
||||
auto l3Config = PreambleHelper<FamilyType>::getL3Config(mockDevice->getHardwareInfo(), false);
|
||||
commandStreamReceiver.lastSentL3Config = l3Config;
|
||||
|
||||
auto &csrCS = commandStreamReceiver.getCS();
|
||||
size_t sizeNeededForPreamble = commandStreamReceiver.getRequiredCmdSizeForPreamble(*pDevice);
|
||||
size_t sizeNeededForPreamble = commandStreamReceiver.getRequiredCmdSizeForPreamble(*mockDevice);
|
||||
size_t sizeNeededForStateBaseAddress = sizeof(STATE_BASE_ADDRESS) + sizeof(PIPE_CONTROL);
|
||||
size_t sizeNeeded = commandStreamReceiver.getRequiredCmdStreamSize(flushTaskFlags, *pDevice);
|
||||
size_t sizeNeeded = commandStreamReceiver.getRequiredCmdStreamSize(flushTaskFlags, *mockDevice);
|
||||
sizeNeeded -= sizeof(MI_BATCH_BUFFER_START); // no task to submit
|
||||
sizeNeeded += sizeof(MI_BATCH_BUFFER_END); // no task to submit, add BBE to CSR stream
|
||||
sizeNeeded = alignUp(sizeNeeded, MemoryConstants::cacheLineSize);
|
||||
@ -992,18 +998,21 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleAn
|
||||
|
||||
commandStream.getSpace(sizeof(PIPE_CONTROL));
|
||||
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
hardwareInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 1;
|
||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo, 0u));
|
||||
auto &commandStreamReceiver = mockDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
|
||||
commandStreamReceiver.timestampPacketWriteEnabled = false;
|
||||
// Force a PIPE_CONTROL through a taskLevel transition
|
||||
taskLevel = commandStreamReceiver.peekTaskLevel() + 1;
|
||||
|
||||
commandStreamReceiver.lastSentCoherencyRequest = 0;
|
||||
|
||||
auto l3Config = PreambleHelper<FamilyType>::getL3Config(pDevice->getHardwareInfo(), false);
|
||||
auto l3Config = PreambleHelper<FamilyType>::getL3Config(mockDevice->getHardwareInfo(), false);
|
||||
commandStreamReceiver.lastSentL3Config = l3Config;
|
||||
|
||||
auto &csrCS = commandStreamReceiver.getCS();
|
||||
size_t sizeNeeded = commandStreamReceiver.getRequiredCmdStreamSizeAligned(flushTaskFlags, *pDevice);
|
||||
size_t sizeNeeded = commandStreamReceiver.getRequiredCmdStreamSizeAligned(flushTaskFlags, *mockDevice);
|
||||
|
||||
csrCS.getSpace(csrCS.getAvailableSpace() - sizeNeeded);
|
||||
auto expectedBase = csrCS.getCpuBase();
|
||||
|
Reference in New Issue
Block a user