Setting default device id for acronym

This PR includes:
- Move product config implementation from
ocloc arg helper to product config helper.
- Add default device id setting for each platform configuration.
- Add & move hw info config tests from opencl to shared

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-7112
This commit is contained in:
Daria Hinz
2022-07-08 11:29:59 +00:00
committed by Compute-Runtime-Automation
parent 05ad32704b
commit 01af53b63c
100 changed files with 1773 additions and 694 deletions

View File

@@ -0,0 +1,22 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <vector>
namespace NEO {
static const std::vector<unsigned short> bxtDeviceIds{
0x9906,
0x9907,
0x0A84,
0x5A84,
0x5A85,
0x1A85,
0x1A84,
0x9908};
} // namespace NEO

View File

@@ -0,0 +1,60 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <vector>
namespace NEO {
static const std::vector<unsigned short> cflDeviceIds{
0x3E90,
0x3E93,
0x3E99,
0x3E92,
0x3E9B,
0x3E94,
0x3E91,
0x3E96,
0x3E9A,
0x3EA9,
0x3E98,
0x3E95,
0x3EA6,
0x3EA7,
0x3EA8,
0x3EA5,
0x9BAB,
0x9BA0,
0x9BC0};
static const std::vector<unsigned short> whlDeviceIds{
0x3EA1,
0x3EA3,
0x3EA4,
0x3EA0,
0x3EA2};
static const std::vector<unsigned short> cmlDeviceIds{
0x9B21,
0x9B41,
0x9BA2,
0x9BA4,
0x9BA5,
0x9BA8,
0x9BAA,
0x9BAC,
0x9BC2,
0x9BC4,
0x9BC5,
0x9BC6,
0x9BC8,
0x9BCA,
0x9BCB,
0x9BCC,
0x9BE6,
0x9BF6};
} // namespace NEO

View File

@@ -5,7 +5,27 @@
*
*/
#include "shared/source/gen9/cfl/device_ids_configs_cfl.h"
#include "platforms.h"
#include <algorithm>
namespace NEO {
template <>
AOT::PRODUCT_CONFIG HwInfoConfigHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
return AOT::CFL;
}
auto deviceId = hwInfo.platform.usDeviceID;
bool isCfl = (std::find(cflDeviceIds.begin(), cflDeviceIds.end(), deviceId) != cflDeviceIds.end());
bool isWhl = (std::find(whlDeviceIds.begin(), whlDeviceIds.end(), deviceId) != whlDeviceIds.end());
bool isCml = (std::find(cmlDeviceIds.begin(), cmlDeviceIds.end(), deviceId) != cmlDeviceIds.end());
if (isCfl) {
return AOT::CFL;
} else if (isCml) {
return AOT::CML;
} else if (isWhl) {
return AOT::WHL;
}
return AOT::UNKNOWN_ISA;
}
} // namespace NEO

View File

@@ -0,0 +1,16 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <vector>
namespace NEO {
static const std::vector<unsigned short> glkDeviceIds{
0x3184,
0x3185};
} // namespace NEO

View File

@@ -0,0 +1,40 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <vector>
namespace NEO {
static const std::vector<unsigned short> amlDeviceIds{0x591C};
static const std::vector<unsigned short> kblDeviceIds{
0x5902,
0x590B,
0x590A,
0x5906,
0x590E,
0x5908,
0x5913,
0x5915,
0x5912,
0x591B,
0x5917,
0x591A,
0x5916,
0x591E,
0x591D,
0x5921,
0x5926,
0x5927,
0x592B,
0x592A,
0x5923,
0x5932,
0x593B,
0x593A,
0x593D};
} // namespace NEO

View File

@@ -5,7 +5,24 @@
*
*/
#include "shared/source/gen9/kbl/device_ids_configs_kbl.h"
#include "platforms.h"
#include <algorithm>
namespace NEO {
template <>
AOT::PRODUCT_CONFIG HwInfoConfigHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
return AOT::KBL;
}
auto deviceId = hwInfo.platform.usDeviceID;
bool isKbl = (std::find(kblDeviceIds.begin(), kblDeviceIds.end(), deviceId) != kblDeviceIds.end());
bool isAml = (std::find(amlDeviceIds.begin(), amlDeviceIds.end(), deviceId) != amlDeviceIds.end());
if (isKbl) {
return AOT::KBL;
} else if (isAml) {
return AOT::AML;
}
return AOT::UNKNOWN_ISA;
}
} // namespace NEO

View File

@@ -11,13 +11,10 @@
#include "shared/source/os_interface/hw_info_config.inl"
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
#include "platforms.h"
namespace NEO {
constexpr static auto gfxProduct = IGFX_COFFEELAKE;
#include "shared/source/gen9/cfl/os_agnostic_hw_info_config_cfl.inl"
namespace NEO {
template <>
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
if (nullptr == osIface) {

View File

@@ -11,13 +11,10 @@
#include "shared/source/os_interface/hw_info_config.inl"
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
#include "platforms.h"
namespace NEO {
constexpr static auto gfxProduct = IGFX_KABYLAKE;
#include "shared/source/gen9/kbl/os_agnostic_hw_info_config_kbl.inl"
namespace NEO {
template <>
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
if (nullptr == osIface) {

View File

@@ -0,0 +1,40 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <vector>
namespace NEO {
static const std::vector<unsigned short> sklDeviceIds{
0x1902,
0x190B,
0x190A,
0x1906,
0x190E,
0x1917,
0x1913,
0X1915,
0x1912,
0x191B,
0x191A,
0x1916,
0x191E,
0x191D,
0x1921,
0x9905,
0x192B,
0x192D,
0x192A,
0x1923,
0x1926,
0x1927,
0x1932,
0x193B,
0x193A,
0x193D};
} // namespace NEO

View File

@@ -10,12 +10,10 @@
#include "shared/source/os_interface/hw_info_config.inl"
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
#include "platforms.h"
constexpr static auto gfxProduct = IGFX_COFFEELAKE;
#include "shared/source/gen9/cfl/os_agnostic_hw_info_config_cfl.inl"
namespace NEO {
constexpr static auto gfxProduct = IGFX_COFFEELAKE;
#include "shared/source/gen9/cfl/os_agnostic_hw_info_config_cfl.inl"
template class HwInfoConfigHw<gfxProduct>;

View File

@@ -10,13 +10,9 @@
#include "shared/source/os_interface/hw_info_config.inl"
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
#include "platforms.h"
namespace NEO {
constexpr static auto gfxProduct = IGFX_KABYLAKE;
#include "shared/source/gen9/kbl/os_agnostic_hw_info_config_kbl.inl"
namespace NEO {
template class HwInfoConfigHw<gfxProduct>;
} // namespace NEO