File: igc_platform_helper.cpp

package info (click to toggle)
intel-compute-runtime 25.44.36015.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 79,632 kB
  • sloc: cpp: 931,547; lisp: 2,074; sh: 719; makefile: 162; python: 21
file content (44 lines) | stat: -rw-r--r-- 1,655 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Copyright (C) 2022-2023 Intel Corporation
 *
 * SPDX-License-Identifier: MIT
 *
 */

#include "shared/source/compiler_interface/igc_platform_helper.h"

#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/hw_info.h"

#include "ocl_igc_interface/gt_system_info.h"
#include "ocl_igc_interface/igc_features_and_workarounds.h"
#include "ocl_igc_interface/platform_helper.h"

namespace NEO {

template <>
void populateIgcPlatform<>(IGC::Platform<1> &igcPlatform, const HardwareInfo &hwInfo) {
    IGC::PlatformHelper::PopulateInterfaceWith(igcPlatform, hwInfo.platform);
}

template <>
void populateIgcPlatform<>(IGC::Platform<2> &igcPlatform, const HardwareInfo &inputHwInfo) {
    auto hwInfo = inputHwInfo;
    auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
    if (compilerProductHelper) {
        compilerProductHelper->adjustHwInfoForIgc(hwInfo);
    }
    igcPlatform.SetProductFamily(hwInfo.platform.eProductFamily);
    igcPlatform.SetPCHProductFamily(hwInfo.platform.ePCHProductFamily);
    igcPlatform.SetDisplayCoreFamily(hwInfo.platform.eDisplayCoreFamily);
    igcPlatform.SetRenderCoreFamily(hwInfo.platform.eRenderCoreFamily);
    igcPlatform.SetPlatformType(hwInfo.platform.ePlatformType);
    igcPlatform.SetDeviceID(hwInfo.platform.usDeviceID);
    igcPlatform.SetRevId(hwInfo.platform.usRevId);
    igcPlatform.SetDeviceID_PCH(hwInfo.platform.usDeviceID_PCH);
    igcPlatform.SetRevId_PCH(hwInfo.platform.usRevId_PCH);
    igcPlatform.SetGTType(hwInfo.platform.eGTType);
    igcPlatform.SetRenderBlockID(hwInfo.ipVersion.value);
}

} // namespace NEO