mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
feature: fail stateful kernel when stateless is required
Resolves: NEO-11859 Signed-off-by: Damian Tomczak <damian.tomczak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
495cdca789
commit
2a8c0d867f
@@ -14,6 +14,7 @@
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
#include "shared/test/common/mocks/mock_release_helper.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
@@ -545,3 +546,17 @@ HWTEST_F(CompilerProductHelperFixture, GivenRequestForExtraKernelCapabilitiesThe
|
||||
EXPECT_EQ(0u, extraCaps);
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(CompilerProductHelperFixture, givenStatefulPlatformWhenFailBuildProgramWithStatefulAccessPreferenceThenFalseIsReturned, IsStatefulBufferPreferredForProduct) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||
EXPECT_FALSE(compilerProductHelper.failBuildProgramWithStatefulAccessPreference());
|
||||
}
|
||||
|
||||
HWTEST2_F(CompilerProductHelperFixture, givenNotStatefulPlatformWhenFailBuildProgramWithStatefulAccessPreferenceThenTrueIsReturned, IsStatelessBufferPreferredForProduct) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||
EXPECT_TRUE(compilerProductHelper.failBuildProgramWithStatefulAccessPreference());
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2024 Intel Corporation
|
||||
* Copyright (C) 2023-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -38,13 +38,6 @@ PVCTEST_F(CompilerProductHelperPvcTest, givenPvcConfigsWhenMatchConfigWithRevIdT
|
||||
EXPECT_EQ(compilerProductHelper.matchRevisionIdWithProductConfig(AOT::PVC_XT_C0_VG, 0x2f), AOT::PVC_XT_C0_VG);
|
||||
}
|
||||
|
||||
PVCTEST_F(CompilerProductHelperPvcTest, givenPvcWhenFailBuildProgramWithStatefulAccessPreferenceThenFalseIsReturned) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
||||
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||
EXPECT_FALSE(compilerProductHelper.failBuildProgramWithStatefulAccessPreference());
|
||||
}
|
||||
|
||||
PVCTEST_F(CompilerProductHelperPvcTest, givenPvcB0AndLaterThenMatrixMultiplyAccumulateTF32IsSupported) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
||||
|
||||
Reference in New Issue
Block a user