Ocloc: New AOT design implementation

Ocloc will handle any new values that may be
passed to the -device argument.

Supported acronyms are available under cmd:
ocloc compile --help

Supported patterns:
- device acronym
- release acronym
- family acronym
- version (major.minor.revision)

Fatbinary will no longer handle major.minor.revision variances,
only acronyms allowed.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
This commit is contained in:
Daria Hinz
2022-06-13 23:13:43 +00:00
committed by Compute-Runtime-Automation
parent 2a71266708
commit 6d365cbfc3
77 changed files with 1962 additions and 1869 deletions

View File

@@ -7,20 +7,39 @@
#pragma once
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/product_config_helper.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/source/xe_hpc_core/hw_cmds_base.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/test_macros/test.h"
using namespace NEO;
struct ProductConfigTests : public ::testing::Test {
template <typename T>
struct ProductConfigTest : public T {
void SetUp() override {
T::SetUp();
hwInfo = *NEO::defaultHwInfo;
hwInfoConfig = NEO::HwInfoConfig::get(productFamily);
}
NEO::HwInfoConfig *hwInfoConfig = nullptr;
NEO::HardwareInfo hwInfo = {};
PRODUCT_CONFIG productConfig = UNKNOWN_ISA;
};
AOT::PRODUCT_CONFIG productConfig = AOT::UNKNOWN_ISA;
};
struct ProductConfigHwInfoTests : public ProductConfigTest<::testing::TestWithParam<std::tuple<AOT::PRODUCT_CONFIG, PRODUCT_FAMILY>>> {
void SetUp() override {
ProductConfigTest::SetUp();
std::tie(productConfig, prod) = GetParam();
if (prod != productFamily) {
GTEST_SKIP();
}
}
PRODUCT_FAMILY prod = IGFX_UNKNOWN;
const AheadOfTimeConfig invalidConfig = {CommonConstants::invalidRevisionID};
};
using ProductConfigTests = ProductConfigTest<::testing::Test>;
using ProductConfigHwInfoBadRevisionTests = ProductConfigHwInfoTests;
using ProductConfigHwInfoBadArchTests = ProductConfigHwInfoTests;

View File

@@ -107,8 +107,8 @@ uint32_t HwInfoConfigHw<IGFX_UNKNOWN>::getHwRevIdFromStepping(uint32_t stepping,
}
template <>
PRODUCT_CONFIG HwInfoConfigHw<IGFX_UNKNOWN>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
return UNKNOWN_ISA;
AOT::PRODUCT_CONFIG HwInfoConfigHw<IGFX_UNKNOWN>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
return AOT::UNKNOWN_ISA;
}
template <>

View File

@@ -0,0 +1,15 @@
#
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
if(TESTS_PVC)
set(NEO_CORE_TESTS_PVC
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/product_configs_pvc.h
)
set_property(GLOBAL PROPERTY NEO_CORE_TESTS_PVC ${NEO_CORE_TESTS_PVC})
target_sources(${TARGET_NAME} PRIVATE ${NEO_CORE_TESTS_PVC})
endif()

View File

@@ -0,0 +1,19 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "platforms.h"
namespace AOT_PVC {
constexpr AOT::PRODUCT_CONFIG productConfigs[] = {
AOT::PVC_XL_A0,
AOT::PVC_XL_A0P,
AOT::PVC_XT_A0,
AOT::PVC_XT_B0,
AOT::PVC_XT_B1,
AOT::PVC_XT_C0};
}

View File

@@ -13,6 +13,7 @@ if(TESTS_DG2)
set(NEO_CORE_TESTS_XE_HPG_CORE_DG2
${IGDRCL_SRCS_tests_xe_hpg_core_dg2_excludes}
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/product_configs_dg2.h
${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dg2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dispatch_kernel_dg2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_helper_dg2.cpp
@@ -21,4 +22,5 @@ if(TESTS_DG2)
)
target_sources(${TARGET_NAME} PRIVATE ${NEO_CORE_TESTS_XE_HPG_CORE_DG2})
add_subdirectories()
endif()

View File

@@ -0,0 +1,20 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "platforms.h"
namespace AOT_DG2 {
constexpr AOT::PRODUCT_CONFIG productConfigs[] = {
AOT::DG2_G10_A0,
AOT::DG2_G10_A1,
AOT::DG2_G10_B0,
AOT::DG2_G10_C0,
AOT::DG2_G11_A0,
AOT::DG2_G11_B0,
AOT::DG2_G11_B1};
}