Skip to content

Commit 50f4029

Browse files
Add WaDisableFusedThreadScheduling
Change-Id: I5ad09fc7d366b8062ff7b10f86718f3afe28ba0b Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
1 parent 9229b48 commit 50f4029

File tree

8 files changed

+28
-16
lines changed

8 files changed

+28
-16
lines changed

core/gen12lp/preamble_gen12lp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ uint32_t PreambleHelper<TGLLPFamily>::getUrbEntryAllocationSize() {
7676
}
7777

7878
template <>
79-
void PreambleHelper<TGLLPFamily>::programAdditionalFieldsInVfeState(VFE_STATE_TYPE *mediaVfeState) {
79+
void PreambleHelper<TGLLPFamily>::programAdditionalFieldsInVfeState(VFE_STATE_TYPE *mediaVfeState, const HardwareInfo &hwInfo) {
80+
mediaVfeState->setDisableSlice0Subslice2(hwInfo.workaroundTable.waDisableFusedThreadScheduling);
8081

8182
if (DebugManager.flags.CFEFusedEUDispatch.get() != -1) {
8283
mediaVfeState->setDisableSlice0Subslice2(DebugManager.flags.CFEFusedEUDispatch.get());

core/helpers/preamble.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct PreambleHelper {
4141
int scratchSize,
4242
uint64_t scratchAddress,
4343
uint32_t maxFrontEndThreads);
44-
static void programAdditionalFieldsInVfeState(VFE_STATE_TYPE *mediaVfeState);
44+
static void programAdditionalFieldsInVfeState(VFE_STATE_TYPE *mediaVfeState, const HardwareInfo &hwInfo);
4545
static void programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config,
4646
uint32_t requiredThreadArbitrationPolicy, GraphicsAllocation *preemptionCsr, GraphicsAllocation *perDssBackedBuffer);
4747
static void programKernelDebugging(LinearStream *pCommandStream);

core/helpers/preamble_base.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bool PreambleHelper<GfxFamily>::isL3Configurable(const HardwareInfo &hwInfo) {
112112
}
113113

114114
template <typename GfxFamily>
115-
void PreambleHelper<GfxFamily>::programAdditionalFieldsInVfeState(VFE_STATE_TYPE *mediaVfeState) {
115+
void PreambleHelper<GfxFamily>::programAdditionalFieldsInVfeState(VFE_STATE_TYPE *mediaVfeState, const HardwareInfo &hwInfo) {
116116
}
117117

118118
} // namespace NEO

core/helpers/preamble_bdw_plus.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ uint64_t PreambleHelper<GfxFamily>::programVFEState(LinearStream *pCommandStream
4848
pMediaVfeState->setScratchSpaceBasePointer(lowAddress);
4949
pMediaVfeState->setScratchSpaceBasePointerHigh(highAddress);
5050

51-
programAdditionalFieldsInVfeState(pMediaVfeState);
51+
programAdditionalFieldsInVfeState(pMediaVfeState, hwInfo);
5252

5353
return scratchSpaceAddressOffset;
5454
}

runtime/sku_info/operations/sku_info_receiver.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ class SkuInfoReceiver {
129129
RECEIVE_WA(AuxTable16KGranular);
130130
RECEIVE_WA(Limit128BMediaCompr);
131131
RECEIVE_WA(UntypedBufferCompression);
132+
RECEIVE_WA(DisableFusedThreadScheduling);
132133
#undef RECEIVE_WA
133134
}
134135
};

runtime/sku_info/sku_info_base.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,6 @@ struct WorkaroundTableBase {
117117
bool waLimit128BMediaCompr = false;
118118
bool waUntypedBufferCompression = false;
119119
bool waAuxTable16KGranular = false;
120+
bool waDisableFusedThreadScheduling = false;
120121
};
121122
} // namespace NEO

unit_tests/gen12lp/test_preamble_gen12lp.cpp

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,28 @@ TGLLPTEST_F(Gen12LpPreambleVfeState, givenDefaultPipeControlWhenItIsProgrammedTh
129129
TGLLPTEST_F(Gen12LpPreambleVfeState, givenCfeFusedEuDispatchFlagsWhenprogramAdditionalFieldsInVfeStateIsCalledThenGetDisableSlice0Subslice2ReturnsCorrectValues) {
130130
using MEDIA_VFE_STATE = typename FamilyType::MEDIA_VFE_STATE;
131131

132+
DebugManagerStateRestore restorer;
133+
auto pHwInfo = pPlatform->getDevice(0)->getExecutionEnvironment()->getMutableHardwareInfo();
132134
auto pMediaVfeState = reinterpret_cast<MEDIA_VFE_STATE *>(linearStream.getSpace(sizeof(MEDIA_VFE_STATE)));
133135
*pMediaVfeState = FamilyType::cmdInitMediaVfeState;
134-
135-
DebugManagerStateRestore restorer;
136-
137-
std::vector<std::pair<bool, int32_t>> testParams{{false, 0},
138-
{false, -1},
139-
{true, 1},
140-
{true, -1}};
141-
142-
for (const auto &it : testParams) {
143-
::DebugManager.flags.CFEFusedEUDispatch.set(it.second);
144-
PreambleHelper<FamilyType>::programAdditionalFieldsInVfeState(pMediaVfeState);
145-
EXPECT_EQ(it.first, pMediaVfeState->getDisableSlice0Subslice2());
136+
auto &waTable = pHwInfo->workaroundTable;
137+
138+
const std::array<std::tuple<bool, bool, int32_t>, 6> testParams{std::make_tuple(false, false, 0),
139+
std::make_tuple(false, true, 0),
140+
std::make_tuple(false, false, -1),
141+
std::make_tuple(true, false, 1),
142+
std::make_tuple(true, true, -1),
143+
std::make_tuple(true, true, 1)};
144+
145+
for (const auto &params : testParams) {
146+
bool expectedValue, waDisableFusedThreadScheduling;
147+
int32_t debugKeyValue;
148+
std::tie(expectedValue, waDisableFusedThreadScheduling, debugKeyValue) = params;
149+
150+
waTable.waDisableFusedThreadScheduling = waDisableFusedThreadScheduling;
151+
::DebugManager.flags.CFEFusedEUDispatch.set(debugKeyValue);
152+
PreambleHelper<FamilyType>::programAdditionalFieldsInVfeState(pMediaVfeState, *pHwInfo);
153+
EXPECT_EQ(expectedValue, pMediaVfeState->getDisableSlice0Subslice2());
146154
}
147155
}
148156

unit_tests/sku_info/sku_info_base_reference.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ struct SkuInfoBaseReference {
165165
refWaTable.waLimit128BMediaCompr = 1;
166166
refWaTable.waUntypedBufferCompression = 1;
167167
refWaTable.waAuxTable16KGranular = 1;
168+
refWaTable.waDisableFusedThreadScheduling = true;
168169
}
169170
}; // namespace SkuInfoBaseReference
170171
} // namespace NEO

0 commit comments

Comments
 (0)