Files
compute-runtime/shared/test/unit_test/command_stream/stream_properties_tests.cpp
Bartosz Dunajski d3aecdc73a Update StreamProperties
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-11-19 16:01:04 +01:00

46 lines
1.6 KiB
C++

/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/command_stream/stream_properties.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/unit_test/command_stream/stream_properties_tests_common.h"
#include "test.h"
namespace NEO {
std::vector<StreamProperty *> getAllStateComputeModeProperties(StateComputeModeProperties &properties) {
std::vector<StreamProperty *> allProperties;
allProperties.push_back(&properties.isCoherencyRequired);
allProperties.push_back(&properties.largeGrfMode);
allProperties.push_back(&properties.zPassAsyncComputeThreadLimit);
allProperties.push_back(&properties.pixelAsyncComputeThreadLimit);
return allProperties;
}
std::vector<StreamProperty *> getAllFrontEndProperties(FrontEndProperties &properties) {
std::vector<StreamProperty *> allProperties;
allProperties.push_back(&properties.disableOverdispatch);
allProperties.push_back(&properties.singleSliceDispatchCcsMode);
return allProperties;
}
} // namespace NEO
using namespace NEO;
TEST(StreamPropertiesTests, whenSettingCooperativeKernelPropertiesThenCorrectValueIsSet) {
StreamProperties properties;
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);
}
}
}