mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Add test that ensures gmm is being initialized with proper HwInfo
Related-To: NEO-3331 Change-Id: If7f463a065d5d10a22a550c46cb05f3f7a322b0d Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
023819ee0b
commit
dfd361dc74
@@ -7,18 +7,31 @@
|
||||
|
||||
#include "runtime/execution_environment/execution_environment.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/os_interface/device_factory.h"
|
||||
#include "runtime/platform/platform.h"
|
||||
#include "test.h"
|
||||
|
||||
namespace NEO {
|
||||
bool getDevices(size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment);
|
||||
} // namespace NEO
|
||||
using namespace NEO;
|
||||
|
||||
using GetDevicesTests = ::testing::Test;
|
||||
|
||||
HWTEST_F(GetDevicesTests, WhenGetDevicesIsCalledThenSuccessIsReturned) {
|
||||
size_t numDevicesReturned = 0;
|
||||
NEO::ExecutionEnvironment executionEnviornment;
|
||||
ExecutionEnvironment executionEnviornment;
|
||||
|
||||
auto returnValue = NEO::getDevices(numDevicesReturned, executionEnviornment);
|
||||
auto returnValue = DeviceFactory::getDevices(numDevicesReturned, executionEnviornment);
|
||||
EXPECT_EQ(true, returnValue);
|
||||
}
|
||||
|
||||
HWTEST_F(GetDevicesTests, whenGetDevicesIsCalledThenGmmIsBeingInitializedAfterFillingHwInfo) {
|
||||
platformImpl.reset(new Platform());
|
||||
size_t numDevicesReturned = 0;
|
||||
HardwareInfo hwInfo;
|
||||
hwInfo.platform.eProductFamily = PRODUCT_FAMILY::IGFX_UNKNOWN;
|
||||
hwInfo.platform.eRenderCoreFamily = GFXCORE_FAMILY::IGFX_UNKNOWN_CORE;
|
||||
hwInfo.platform.ePCHProductFamily = PCH_PRODUCT_FAMILY::PCH_UNKNOWN;
|
||||
platform()->peekExecutionEnvironment()->setHwInfo(&hwInfo);
|
||||
|
||||
auto returnValue = DeviceFactory::getDevices(numDevicesReturned, *platform()->peekExecutionEnvironment());
|
||||
EXPECT_TRUE(returnValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user