mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Enable CFL
Change-Id: I268a6d86fe69859064698d7de0c4c9949fda29a4
This commit is contained in:
committed by
sys_ocldev
parent
94ae9a3d1b
commit
8ece8ab420
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2017, Intel Corporation
|
||||
# Copyright (c) 2018, Intel Corporation
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
@@ -136,6 +136,7 @@ if(SUPPORT_GEN9)
|
||||
set(SUPPORT_KBL ${SUPPORT_PLATFORM_DEFAULT} CACHE BOOL "Support KBL")
|
||||
set(SUPPORT_BXT ${SUPPORT_PLATFORM_DEFAULT} CACHE BOOL "Support BXT")
|
||||
set(SUPPORT_GLK ${SUPPORT_PLATFORM_DEFAULT} CACHE BOOL "Support GLK")
|
||||
set(SUPPORT_CFL ${SUPPORT_PLATFORM_DEFAULT} CACHE BOOL "Support CFL")
|
||||
endif()
|
||||
|
||||
if(TESTS_GEN9)
|
||||
@@ -151,6 +152,9 @@ if(TESTS_GEN9)
|
||||
if(SUPPORT_BXT)
|
||||
set(TESTS_BXT ${TESTS_GEN9} CACHE BOOL "Build ULTs for BXT")
|
||||
endif()
|
||||
if(SUPPORT_CFL)
|
||||
set(TESTS_CFL ${TESTS_GEN9} CACHE BOOL "Build ULTs for CFL")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Init lists
|
||||
@@ -210,6 +214,15 @@ if(SUPPORT_GEN9)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SUPPORT_CFL)
|
||||
ADD_ITEM_FOR_GEN("PLATFORMS" "SUPPORTED" 9 "CFL")
|
||||
ADD_ITEM_FOR_GEN("PLATFORMS" "SUPPORTED_2_0" 9 "CFL")
|
||||
if(TESTS_CFL)
|
||||
ADD_ITEM_FOR_GEN("PLATFORMS" "TESTED" 9 "CFL")
|
||||
ADD_ITEM_FOR_GEN("CONFIGURATIONS" "UNIT_TESTS" 9 "cfl/1/3/6")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SUPPORT_BXT)
|
||||
ADD_ITEM_FOR_GEN("PLATFORMS" "SUPPORTED" 9 "BXT")
|
||||
if(TESTS_BXT)
|
||||
|
||||
29
runtime/gen9/enable_cfl.cpp
Normal file
29
runtime/gen9/enable_cfl.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "hw_cmds.h"
|
||||
|
||||
namespace OCLRT {
|
||||
#include "runtime/helpers/enable_product.inl"
|
||||
|
||||
static EnableGfxProductHw<IGFX_COFFEELAKE> enableGfxProductHw;
|
||||
} // namespace OCLRT
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Intel Corporation
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -33,3 +33,6 @@
|
||||
#ifdef SUPPORT_GLK
|
||||
#include "hw_cmds_glk.h"
|
||||
#endif
|
||||
#ifdef SUPPORT_CFL
|
||||
#include "hw_cmds_cfl.h"
|
||||
#endif
|
||||
|
||||
85
runtime/gen9/hw_cmds_cfl.h
Normal file
85
runtime/gen9/hw_cmds_cfl.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "hw_cmds_base.h"
|
||||
|
||||
namespace OCLRT {
|
||||
|
||||
struct CFL : public SKLFamily {
|
||||
static const PLATFORM platform;
|
||||
static const HardwareInfo hwInfo;
|
||||
|
||||
static const uint32_t threadsPerEu = 7;
|
||||
static const uint32_t maxEuPerSubslice = 8;
|
||||
static const uint32_t maxSlicesSupported = 3;
|
||||
static const uint32_t maxSubslicesSupported = 9;
|
||||
|
||||
static const RuntimeCapabilityTable capabilityTable;
|
||||
static void (*setupGtSystemInfo)(GT_SYSTEM_INFO *gtSysInfo);
|
||||
};
|
||||
|
||||
class CFL_1x2x6 : public CFL {
|
||||
public:
|
||||
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
|
||||
static const HardwareInfo hwInfo;
|
||||
|
||||
private:
|
||||
static GT_SYSTEM_INFO gtSystemInfo;
|
||||
};
|
||||
|
||||
class CFL_1x3x6 : public CFL {
|
||||
public:
|
||||
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
|
||||
static const HardwareInfo hwInfo;
|
||||
|
||||
private:
|
||||
static GT_SYSTEM_INFO gtSystemInfo;
|
||||
};
|
||||
|
||||
class CFL_1x3x8 : public CFL {
|
||||
public:
|
||||
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
|
||||
static const HardwareInfo hwInfo;
|
||||
|
||||
private:
|
||||
static GT_SYSTEM_INFO gtSystemInfo;
|
||||
};
|
||||
|
||||
class CFL_2x3x8 : public CFL {
|
||||
public:
|
||||
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
|
||||
static const HardwareInfo hwInfo;
|
||||
|
||||
private:
|
||||
static GT_SYSTEM_INFO gtSystemInfo;
|
||||
};
|
||||
|
||||
class CFL_3x3x8 : public CFL {
|
||||
public:
|
||||
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
|
||||
static const HardwareInfo hwInfo;
|
||||
|
||||
private:
|
||||
static GT_SYSTEM_INFO gtSystemInfo;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Intel Corporation
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -32,3 +32,6 @@
|
||||
#ifdef SUPPORT_GLK
|
||||
#include "hw_info_glk.h"
|
||||
#endif
|
||||
#ifdef SUPPORT_CFL
|
||||
#include "hw_info_cfl.h"
|
||||
#endif
|
||||
|
||||
216
runtime/gen9/hw_info_cfl.cpp
Normal file
216
runtime/gen9/hw_info_cfl.cpp
Normal file
@@ -0,0 +1,216 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "hw_info_cfl.h"
|
||||
#include "hw_cmds.h"
|
||||
#include "runtime/helpers/engine_node.h"
|
||||
|
||||
namespace OCLRT {
|
||||
|
||||
const char *HwMapper<IGFX_COFFEELAKE>::abbreviation = "cfl";
|
||||
|
||||
bool isSimulationCFL(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM CFL::platform = {
|
||||
IGFX_COFFEELAKE,
|
||||
PCH_UNKNOWN,
|
||||
IGFX_GEN9_CORE,
|
||||
IGFX_GEN9_CORE,
|
||||
PLATFORM_NONE, // default init
|
||||
0, // usDeviceID
|
||||
0, // usRevId. 0 sets the stepping to A0
|
||||
0, // usDeviceID_PCH
|
||||
0, // usRevId_PCH
|
||||
GTTYPE_UNDEFINED};
|
||||
|
||||
const RuntimeCapabilityTable CFL::capabilityTable{
|
||||
0,
|
||||
83.333,
|
||||
21,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true, // ftrSupportsVmeAvcTextureSampler
|
||||
false, // ftrSupportsVmeAvcPreemption
|
||||
false,
|
||||
PreemptionMode::ThreadGroup,
|
||||
{true, false},
|
||||
&isSimulationCFL,
|
||||
true,
|
||||
true, // forceStatelessCompilationFor32Bit
|
||||
false, // EnableKmdNotify
|
||||
30, // delayKmdNotifyMs
|
||||
true, // ftr64KBpages
|
||||
EngineType::ENGINE_RCS // nodeOrdinal
|
||||
};
|
||||
|
||||
const HardwareInfo CFL_1x2x6::hwInfo = {
|
||||
&CFL::platform,
|
||||
&emptySkuTable,
|
||||
&emptyWaTable,
|
||||
&CFL_1x2x6::gtSystemInfo,
|
||||
CFL::capabilityTable,
|
||||
};
|
||||
GT_SYSTEM_INFO CFL_1x2x6::gtSystemInfo = {0};
|
||||
void CFL_1x2x6::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
|
||||
gtSysInfo->EUCount = 11;
|
||||
gtSysInfo->ThreadCount = 11 * CFL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
gtSysInfo->SubSliceCount = 2;
|
||||
gtSysInfo->L3CacheSizeInKb = 384;
|
||||
gtSysInfo->L3BankCount = 2;
|
||||
gtSysInfo->MaxFillRate = 8;
|
||||
gtSysInfo->TotalVsThreads = 336;
|
||||
gtSysInfo->TotalHsThreads = 336;
|
||||
gtSysInfo->TotalDsThreads = 336;
|
||||
gtSysInfo->TotalGsThreads = 336;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
};
|
||||
|
||||
const HardwareInfo CFL_1x3x6::hwInfo = {
|
||||
&CFL::platform,
|
||||
&emptySkuTable,
|
||||
&emptyWaTable,
|
||||
&CFL_1x3x6::gtSystemInfo,
|
||||
CFL::capabilityTable,
|
||||
};
|
||||
GT_SYSTEM_INFO CFL_1x3x6::gtSystemInfo = {0};
|
||||
void CFL_1x3x6::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
|
||||
gtSysInfo->EUCount = 17;
|
||||
gtSysInfo->ThreadCount = 17 * CFL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
gtSysInfo->SubSliceCount = 3;
|
||||
gtSysInfo->L3CacheSizeInKb = 768;
|
||||
gtSysInfo->L3BankCount = 4;
|
||||
gtSysInfo->MaxFillRate = 8;
|
||||
gtSysInfo->TotalVsThreads = 336;
|
||||
gtSysInfo->TotalHsThreads = 336;
|
||||
gtSysInfo->TotalDsThreads = 336;
|
||||
gtSysInfo->TotalGsThreads = 336;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
};
|
||||
|
||||
const HardwareInfo CFL_1x3x8::hwInfo = {
|
||||
&CFL::platform,
|
||||
&emptySkuTable,
|
||||
&emptyWaTable,
|
||||
&CFL_1x3x8::gtSystemInfo,
|
||||
CFL::capabilityTable,
|
||||
};
|
||||
GT_SYSTEM_INFO CFL_1x3x8::gtSystemInfo = {0};
|
||||
void CFL_1x3x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
|
||||
gtSysInfo->EUCount = 23;
|
||||
gtSysInfo->ThreadCount = 23 * CFL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
gtSysInfo->SubSliceCount = 3;
|
||||
gtSysInfo->L3CacheSizeInKb = 768;
|
||||
gtSysInfo->L3BankCount = 4;
|
||||
gtSysInfo->MaxFillRate = 8;
|
||||
gtSysInfo->TotalVsThreads = 336;
|
||||
gtSysInfo->TotalHsThreads = 336;
|
||||
gtSysInfo->TotalDsThreads = 336;
|
||||
gtSysInfo->TotalGsThreads = 336;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
};
|
||||
|
||||
const HardwareInfo CFL_2x3x8::hwInfo = {
|
||||
&CFL::platform,
|
||||
&emptySkuTable,
|
||||
&emptyWaTable,
|
||||
&CFL_2x3x8::gtSystemInfo,
|
||||
CFL::capabilityTable,
|
||||
};
|
||||
GT_SYSTEM_INFO CFL_2x3x8::gtSystemInfo = {0};
|
||||
void CFL_2x3x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
|
||||
gtSysInfo->EUCount = 47;
|
||||
gtSysInfo->ThreadCount = 47 * CFL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 2;
|
||||
gtSysInfo->SubSliceCount = 6;
|
||||
gtSysInfo->L3CacheSizeInKb = 1536;
|
||||
gtSysInfo->L3BankCount = 8;
|
||||
gtSysInfo->MaxFillRate = 16;
|
||||
gtSysInfo->TotalVsThreads = 336;
|
||||
gtSysInfo->TotalHsThreads = 336;
|
||||
gtSysInfo->TotalDsThreads = 336;
|
||||
gtSysInfo->TotalGsThreads = 336;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
};
|
||||
|
||||
const HardwareInfo CFL_3x3x8::hwInfo = {
|
||||
&CFL::platform,
|
||||
&emptySkuTable,
|
||||
&emptyWaTable,
|
||||
&CFL_3x3x8::gtSystemInfo,
|
||||
CFL::capabilityTable,
|
||||
};
|
||||
GT_SYSTEM_INFO CFL_3x3x8::gtSystemInfo = {0};
|
||||
void CFL_3x3x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
|
||||
gtSysInfo->EUCount = 71;
|
||||
gtSysInfo->ThreadCount = 71 * CFL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 3;
|
||||
gtSysInfo->SubSliceCount = 9;
|
||||
gtSysInfo->L3CacheSizeInKb = 2304;
|
||||
gtSysInfo->L3BankCount = 12;
|
||||
gtSysInfo->MaxFillRate = 24;
|
||||
gtSysInfo->TotalVsThreads = 336;
|
||||
gtSysInfo->TotalHsThreads = 336;
|
||||
gtSysInfo->TotalDsThreads = 336;
|
||||
gtSysInfo->TotalGsThreads = 336;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
};
|
||||
|
||||
const HardwareInfo CFL::hwInfo = CFL_1x3x6::hwInfo;
|
||||
void (*CFL::setupGtSystemInfo)(GT_SYSTEM_INFO *) = CFL_1x3x6::setupGtSystemInfo;
|
||||
} // namespace OCLRT
|
||||
37
runtime/gen9/hw_info_cfl.h
Normal file
37
runtime/gen9/hw_info_cfl.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#pragma once
|
||||
#include "hw_info_gen9.h"
|
||||
|
||||
namespace OCLRT {
|
||||
|
||||
struct CFL;
|
||||
|
||||
template <>
|
||||
struct HwMapper<IGFX_COFFEELAKE> {
|
||||
enum { gfxFamily = IGFX_GEN9_CORE };
|
||||
|
||||
static const char *abbreviation;
|
||||
typedef GfxFamilyMapper<static_cast<GFXCORE_FAMILY>(gfxFamily)>::GfxFamily GfxFamily;
|
||||
typedef CFL GfxProduct;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
28
runtime/gen9/linux/enable_cfl.cpp
Normal file
28
runtime/gen9/linux/enable_cfl.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "hw_cmds.h"
|
||||
#include "runtime/os_interface/linux/hw_info_config.h"
|
||||
|
||||
namespace OCLRT {
|
||||
static LinuxEnableGfxProductHw<IGFX_COFFEELAKE> enableLinuxGfxProductHw;
|
||||
} // namespace OCLRT
|
||||
81
runtime/gen9/linux/hw_info_config_cfl.cpp
Normal file
81
runtime/gen9/linux/hw_info_config_cfl.cpp
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/os_interface/linux/hw_info_config.h"
|
||||
|
||||
namespace OCLRT {
|
||||
|
||||
template <>
|
||||
int HwInfoConfigHw<IGFX_COFFEELAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
WorkaroundTable *pWaTable = const_cast<WorkaroundTable *>(hwInfo->pWaTable);
|
||||
|
||||
if (pSysInfo->SubSliceCount > 3) {
|
||||
pSysInfo->SliceCount = 2;
|
||||
} else {
|
||||
pSysInfo->SliceCount = 1;
|
||||
}
|
||||
|
||||
pSysInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1;
|
||||
pSysInfo->VEBoxInfo.IsValid = true;
|
||||
pSkuTable->ftrVEBOX = 1;
|
||||
|
||||
pSkuTable->ftrGpGpuMidBatchPreempt = 1;
|
||||
pSkuTable->ftrGpGpuThreadGroupLevelPreempt = 1;
|
||||
pSkuTable->ftrGpGpuMidThreadLevelPreempt = 1;
|
||||
pSkuTable->ftr3dMidBatchPreempt = 1;
|
||||
pSkuTable->ftr3dObjectLevelPreempt = 1;
|
||||
pSkuTable->ftrPerCtxtPreemptionGranularityControl = 1;
|
||||
|
||||
pSkuTable->ftrPPGTT = 1;
|
||||
pSkuTable->ftrSVM = 1;
|
||||
pSkuTable->ftrL3IACoherency = 1;
|
||||
pSkuTable->ftrIA32eGfxPTEs = 1;
|
||||
|
||||
pSkuTable->ftrDisplayYTiling = 1;
|
||||
pSkuTable->ftrTranslationTable = 1;
|
||||
pSkuTable->ftrUserModeTranslationTable = 1;
|
||||
pSkuTable->ftrEnableGuC = 1;
|
||||
|
||||
pSkuTable->ftrFbc = 1;
|
||||
pSkuTable->ftrFbc2AddressTranslation = 1;
|
||||
pSkuTable->ftrFbcBlitterTracking = 1;
|
||||
pSkuTable->ftrFbcCpuTracking = 1;
|
||||
|
||||
pWaTable->waEnablePreemptionGranularityControlByUMD = 1;
|
||||
pWaTable->waSendMIFLUSHBeforeVFE = 1;
|
||||
pWaTable->waReportPerfCountUseGlobalContextID = 1;
|
||||
pWaTable->waMsaa8xTileYDepthPitchAlignment = 1;
|
||||
pWaTable->waLosslessCompressionSurfaceStride = 1;
|
||||
pWaTable->waFbcLinearSurfaceStride = 1;
|
||||
pWaTable->wa4kAlignUVOffsetNV12LinearSurface = 1;
|
||||
|
||||
if (hwInfo->pPlatform->usDeviceID == ICFL_GT3_ULT_28W_DEVICE_F0_ID ||
|
||||
hwInfo->pPlatform->usDeviceID == ICFL_GT3_ULT_15W_DEVICE_F0_ID) {
|
||||
pSysInfo->EdramSizeInKb = 64 * 1024;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace OCLRT
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2017, Intel Corporation
|
||||
# Copyright (c) 2018, Intel Corporation
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
@@ -71,6 +71,19 @@ if(TESTS_GLK)
|
||||
endif(NOT MSVC)
|
||||
endif()
|
||||
|
||||
if(TESTS_CFL)
|
||||
set(IGDRCL_SRCS_tests_gen9_cfl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cfl/test_device_caps_cfl.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
if(NOT MSVC)
|
||||
set(IGDRCL_SRCS_tests_gen9_cfl_linux
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cfl/linux/hw_info_config_tests.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
endif(NOT MSVC)
|
||||
endif()
|
||||
|
||||
if(TESTS_BXT)
|
||||
set(IGDRCL_SRCS_tests_gen9_bxt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bxt/device_tests_bxt.cpp
|
||||
|
||||
178
unit_tests/gen9/cfl/linux/hw_info_config_tests.cpp
Normal file
178
unit_tests/gen9/cfl/linux/hw_info_config_tests.cpp
Normal file
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "unit_tests/helpers/gtest_helpers.h"
|
||||
#include "unit_tests/os_interface/linux/hw_info_config_tests.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
using namespace std;
|
||||
|
||||
struct HwInfoConfigTestLinuxCfl : HwInfoConfigTestLinux {
|
||||
void SetUp() override {
|
||||
HwInfoConfigTestLinux::SetUp();
|
||||
drm->StoredDeviceID = ICFL_GT2_DT_DEVICE_F0_ID;
|
||||
drm->setGtType(GTTYPE_GT2);
|
||||
}
|
||||
};
|
||||
|
||||
CFLTEST_F(HwInfoConfigTestLinuxCfl, configureHwInfo) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
int ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ((unsigned short)drm->StoredDeviceID, outHwInfo.pPlatform->usDeviceID);
|
||||
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
|
||||
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
|
||||
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
|
||||
|
||||
EXPECT_EQ(GTTYPE_GT2, outHwInfo.pPlatform->eGTType);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1_5);
|
||||
EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT2);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT3);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT4);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTA);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTC);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTX);
|
||||
|
||||
ReleaseOutHwInfoStructs();
|
||||
|
||||
drm->StoredDeviceID = ICFL_GT1_DT_DEVICE_F0_ID;
|
||||
drm->StoredSSVal = 3;
|
||||
drm->setGtType(GTTYPE_GT1);
|
||||
ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ((unsigned short)drm->StoredDeviceID, outHwInfo.pPlatform->usDeviceID);
|
||||
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
|
||||
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
|
||||
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
|
||||
EXPECT_EQ(1u, outHwInfo.pSysInfo->SliceCount);
|
||||
|
||||
EXPECT_EQ(GTTYPE_GT1, outHwInfo.pPlatform->eGTType);
|
||||
EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT1);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1_5);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT2);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT3);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT4);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTA);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTC);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTX);
|
||||
|
||||
ReleaseOutHwInfoStructs();
|
||||
|
||||
drm->StoredDeviceID = ICFL_GT3_ULT_DEVICE_F0_ID;
|
||||
drm->StoredSSVal = 6;
|
||||
drm->setGtType(GTTYPE_GT3);
|
||||
ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ((unsigned short)drm->StoredDeviceID, outHwInfo.pPlatform->usDeviceID);
|
||||
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
|
||||
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
|
||||
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
|
||||
EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount);
|
||||
|
||||
EXPECT_EQ(GTTYPE_GT3, outHwInfo.pPlatform->eGTType);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1_5);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT2);
|
||||
EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT3);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT4);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTA);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTC);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTX);
|
||||
}
|
||||
|
||||
CFLTEST_F(HwInfoConfigTestLinuxCfl, negativeUnknownDevId) {
|
||||
drm->StoredDeviceID = 0;
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
int ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(-1, ret);
|
||||
}
|
||||
|
||||
CFLTEST_F(HwInfoConfigTestLinuxCfl, negativeFailedIoctlDevId) {
|
||||
drm->StoredRetValForDeviceID = -2;
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
int ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(-2, ret);
|
||||
}
|
||||
|
||||
CFLTEST_F(HwInfoConfigTestLinuxCfl, negativeFailedIoctlDevRevId) {
|
||||
drm->StoredRetValForDeviceRevID = -3;
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
int ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(-3, ret);
|
||||
}
|
||||
|
||||
CFLTEST_F(HwInfoConfigTestLinuxCfl, negativeFailedIoctlEuCount) {
|
||||
drm->StoredRetValForEUVal = -4;
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
int ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(-4, ret);
|
||||
}
|
||||
|
||||
CFLTEST_F(HwInfoConfigTestLinuxCfl, negativeFailedIoctlSsCount) {
|
||||
drm->StoredRetValForSSVal = -5;
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
int ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(-5, ret);
|
||||
}
|
||||
|
||||
CFLTEST_F(HwInfoConfigTestLinuxCfl, configureHwInfoEdram) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
|
||||
int ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ_VAL(0u, outHwInfo.pSysInfo->EdramSizeInKb);
|
||||
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrEDram);
|
||||
ReleaseOutHwInfoStructs();
|
||||
|
||||
drm->StoredDeviceID = ICFL_GT3_ULT_28W_DEVICE_F0_ID;
|
||||
drm->setGtType(GTTYPE_GT3);
|
||||
ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ_VAL((64u * 1024u), outHwInfo.pSysInfo->EdramSizeInKb);
|
||||
EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrEDram);
|
||||
ReleaseOutHwInfoStructs();
|
||||
|
||||
drm->StoredDeviceID = ICFL_GT3_ULT_15W_DEVICE_F0_ID;
|
||||
ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ_VAL((64u * 1024u), outHwInfo.pSysInfo->EdramSizeInKb);
|
||||
EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrEDram);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
class CflHwInfoTests : public ::testing::Test {
|
||||
};
|
||||
typedef ::testing::Types<CFL_1x2x6, CFL_1x3x6, CFL_1x3x8, CFL_2x3x8, CFL_3x3x8> cflTestTypes;
|
||||
TYPED_TEST_CASE(CflHwInfoTests, cflTestTypes);
|
||||
TYPED_TEST(CflHwInfoTests, gtSetupIsCorrect) {
|
||||
GT_SYSTEM_INFO gtSystemInfo;
|
||||
memset(>SystemInfo, 0, sizeof(gtSystemInfo));
|
||||
TypeParam::setupGtSystemInfo(>SystemInfo);
|
||||
EXPECT_GT(gtSystemInfo.EUCount, 0u);
|
||||
EXPECT_GT(gtSystemInfo.ThreadCount, 0u);
|
||||
EXPECT_GT(gtSystemInfo.SliceCount, 0u);
|
||||
EXPECT_GT(gtSystemInfo.SubSliceCount, 0u);
|
||||
EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u);
|
||||
EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u);
|
||||
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
|
||||
}
|
||||
43
unit_tests/gen9/cfl/test_device_caps_cfl.cpp
Normal file
43
unit_tests/gen9/cfl/test_device_caps_cfl.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
|
||||
typedef Test<DeviceFixture> CflDeviceCaps;
|
||||
|
||||
CFLTEST_F(CflDeviceCaps, reportsOcl21) {
|
||||
const auto &caps = pDevice->getDeviceInfo();
|
||||
EXPECT_STREQ("OpenCL 2.1 NEO ", caps.clVersion);
|
||||
EXPECT_STREQ("OpenCL C 2.1 ", caps.clCVersion);
|
||||
}
|
||||
|
||||
CFLTEST_F(CflDeviceCaps, kmdNotifyMechanism) {
|
||||
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.enableKmdNotify);
|
||||
EXPECT_EQ(30, pDevice->getHardwareInfo().capabilityTable.delayKmdNotifyMs);
|
||||
}
|
||||
|
||||
CFLTEST_F(CflDeviceCaps, GivenCFLWhenCheckftr64KBpagesThenTrue) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Intel Corporation
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -206,6 +206,12 @@ extern GFXCORE_FAMILY renderCoreFamily;
|
||||
::testing::internal::GetTypeId<test_fixture>(), \
|
||||
IGFX_GEN9_CORE, IGFX_BROXTON)
|
||||
#endif
|
||||
#ifdef TESTS_CFL
|
||||
#define CFLTEST_F(test_fixture, test_name) \
|
||||
FAMILYTEST_TEST_(test_fixture, test_name, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>(), \
|
||||
IGFX_GEN9_CORE, IGFX_COFFEELAKE)
|
||||
#endif
|
||||
#define HWTEST_TYPED_TEST(CaseName, TestName) \
|
||||
template <typename gtest_TypeParam_> \
|
||||
class GTEST_TEST_CLASS_NAME_(CaseName, TestName) : public CaseName<gtest_TypeParam_> { \
|
||||
|
||||
Reference in New Issue
Block a user