mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-23 03:33:13 +08:00
Include files are now grouped and sorted in following order: 1. Header file of the class the current file implements 2. Project files 3. Third party files 4. Standard library Change-Id: If31af05652184169f7fee1d7ad08f1b2ed602cf0 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
71 lines
2.0 KiB
C++
71 lines
2.0 KiB
C++
/*
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "test.h"
|
|
#include "unit_tests/fixtures/device_fixture.h"
|
|
|
|
using namespace OCLRT;
|
|
|
|
typedef Test<DeviceFixture> BxtDeviceCaps;
|
|
|
|
BXTTEST_F(BxtDeviceCaps, reportsOcl12) {
|
|
const auto &caps = pDevice->getDeviceInfo();
|
|
EXPECT_STREQ("OpenCL 1.2 NEO ", caps.clVersion);
|
|
EXPECT_STREQ("OpenCL C 1.2 ", caps.clCVersion);
|
|
}
|
|
|
|
BXTTEST_F(BxtDeviceCaps, BxtProfilingTimerResolution) {
|
|
const auto &caps = pDevice->getDeviceInfo();
|
|
EXPECT_EQ(52u, caps.outProfilingTimerResolution);
|
|
}
|
|
|
|
BXTTEST_F(BxtDeviceCaps, BxtClVersionSupport) {
|
|
const auto &caps = pDevice->getDeviceInfo();
|
|
EXPECT_STREQ("OpenCL 1.2 NEO ", caps.clVersion);
|
|
EXPECT_STREQ("OpenCL C 1.2 ", caps.clCVersion);
|
|
|
|
auto memoryManager = pDevice->getMemoryManager();
|
|
if (is32BitOsAllocatorAvailable) {
|
|
EXPECT_TRUE(memoryManager->peekForce32BitAllocations());
|
|
EXPECT_TRUE(caps.force32BitAddressess);
|
|
} else {
|
|
EXPECT_FALSE(memoryManager->peekForce32BitAllocations());
|
|
EXPECT_FALSE(caps.force32BitAddressess);
|
|
}
|
|
}
|
|
|
|
BXTTEST_F(BxtDeviceCaps, BxtSvmCapabilities) {
|
|
const auto &caps = pDevice->getDeviceInfo();
|
|
EXPECT_EQ(0u, caps.svmCapabilities);
|
|
}
|
|
|
|
BXTTEST_F(BxtDeviceCaps, GivenBXTWhenCheckftr64KBpagesThenFalse) {
|
|
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages);
|
|
}
|
|
|
|
typedef Test<DeviceFixture> BxtUsDeviceIdTest;
|
|
|
|
BXTTEST_F(BxtUsDeviceIdTest, isSimulationCap) {
|
|
unsigned short bxtSimulationIds[3] = {
|
|
IBXT_A_DEVICE_F0_ID,
|
|
IBXT_C_DEVICE_F0_ID,
|
|
0, // default, non-simulation
|
|
};
|
|
OCLRT::MockDevice *mockDevice = nullptr;
|
|
|
|
for (auto id : bxtSimulationIds) {
|
|
mockDevice = createWithUsDeviceId(id);
|
|
ASSERT_NE(mockDevice, nullptr);
|
|
|
|
if (id == 0)
|
|
EXPECT_FALSE(mockDevice->isSimulation());
|
|
else
|
|
EXPECT_TRUE(mockDevice->isSimulation());
|
|
delete mockDevice;
|
|
}
|
|
}
|