2021-05-18 02:46:21 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2021 Intel Corporation
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "shared/source/command_stream/stream_properties.h"
|
2021-07-28 17:17:51 +00:00
|
|
|
#include "shared/test/common/helpers/default_hw_info.h"
|
2021-05-18 02:46:21 +00:00
|
|
|
#include "shared/test/unit_test/command_stream/stream_properties_tests_common.h"
|
|
|
|
|
|
2021-07-28 17:17:51 +00:00
|
|
|
#include "test.h"
|
|
|
|
|
|
2021-05-18 02:46:21 +00:00
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
|
|
std::vector<StreamProperty *> getAllStateComputeModeProperties(StateComputeModeProperties &properties) {
|
|
|
|
|
std::vector<StreamProperty *> allProperties;
|
|
|
|
|
allProperties.push_back(&properties.isCoherencyRequired);
|
2021-07-07 13:34:46 +00:00
|
|
|
allProperties.push_back(&properties.largeGrfMode);
|
2021-05-18 02:46:21 +00:00
|
|
|
return allProperties;
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-26 13:51:11 +00:00
|
|
|
std::vector<StreamProperty *> getAllFrontEndProperties(FrontEndProperties &properties) {
|
2021-07-28 17:17:51 +00:00
|
|
|
std::vector<StreamProperty *> allProperties;
|
|
|
|
|
allProperties.push_back(&properties.disableOverdispatch);
|
2021-08-13 14:48:13 +00:00
|
|
|
allProperties.push_back(&properties.singleSliceDispatchCcsMode);
|
2021-07-28 17:17:51 +00:00
|
|
|
return allProperties;
|
2021-05-26 13:51:11 +00:00
|
|
|
}
|
|
|
|
|
|
2021-05-18 02:46:21 +00:00
|
|
|
} // namespace NEO
|
2021-07-28 17:17:51 +00:00
|
|
|
|
|
|
|
|
using namespace NEO;
|
|
|
|
|
|
|
|
|
|
TEST(StreamPropertiesTests, whenSettingCooperativeKernelPropertiesThenCorrectValueIsSet) {
|
|
|
|
|
StreamProperties properties;
|
2021-08-13 14:48:13 +00:00
|
|
|
for (auto isEngineInstanced : ::testing::Bool()) {
|
|
|
|
|
for (auto disableOverdispatch : ::testing::Bool()) {
|
|
|
|
|
properties.frontEndState.setProperties(false, disableOverdispatch, isEngineInstanced, *defaultHwInfo);
|
|
|
|
|
EXPECT_EQ(disableOverdispatch, properties.frontEndState.disableOverdispatch.value);
|
|
|
|
|
EXPECT_EQ(isEngineInstanced, properties.frontEndState.singleSliceDispatchCcsMode.value);
|
|
|
|
|
}
|
2021-07-28 17:17:51 +00:00
|
|
|
}
|
|
|
|
|
}
|