File: ail_configuration_extra.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 (72 lines) | stat: -rw-r--r-- 2,794 bytes parent folder | download
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * Copyright (C) 2021-2025 Intel Corporation
 *
 * SPDX-License-Identifier: MIT
 *
 */

#include "shared/source/ail/ail_configuration.h"
#include "shared/source/helpers/hash.h"
#include "shared/source/helpers/hw_info.h"

#include <map>
#include <vector>

namespace NEO {
/*
 * fp64 support is unavailable on some Intel GPUs, and the SW emulation in IGC should not be enabled by default.
 * For Blender, fp64 is not performance-critical - SW emulation is good enough for the application to be usable
 * (some versions would not function correctly without it).
 *
 */

std::map<std::string_view, std::vector<AILEnumeration>> applicationMap = {{"blender", {AILEnumeration::enableFp64}},
                                                                          // Modify reported platform name to ensure older versions of Adobe Premiere Pro are able to recognize the GPU device
                                                                          {"Adobe Premiere Pro", {AILEnumeration::enableLegacyPlatformName}}};

std::map<std::string_view, std::vector<AILEnumeration>> applicationMapMTL = {{"svchost", {AILEnumeration::disableDirectSubmission}},
                                                                             {"aomhost64", {AILEnumeration::disableDirectSubmission}},
                                                                             {"Zoom", {AILEnumeration::disableDirectSubmission}}};

const std::set<std::string_view> applicationsForceRcsDg2 = {};

const std::set<std::string_view> applicationsContextSyncFlag = {};

const std::set<std::string_view> applicationsBufferPoolDisabled = {};

const std::set<std::string_view> applicationsBufferPoolDisabledXe = {};

const std::set<std::string_view> applicationsOverfetchDisabled = {};

const std::set<std::string_view> applicationsDrainHostptrsDisabled = {};

const std::set<std::string_view> applicationsDeviceUSMRecyclingLimited = {};

const std::set<std::string_view> applicationsMicrosecontResolutionAdjustment = {};

const uint32_t microsecondAdjustment = 1000;

AILConfigurationCreateFunctionType ailConfigurationFactory[IGFX_MAX_PRODUCT];

void AILConfiguration::apply(HardwareInfo &hwInfo) {
    auto search = applicationMap.find(processName);

    if (search != applicationMap.end()) {
        for (size_t i = 0; i < search->second.size(); ++i) {
            switch (search->second[i]) {
            case AILEnumeration::enableFp64:
                hwInfo.capabilityTable.ftrSupportsFP64 = true;
                break;
            case AILEnumeration::enableLegacyPlatformName:
                hwInfo.capabilityTable.preferredPlatformName = legacyPlatformName;
                break;
            default:
                break;
            }
        }
    }

    applyExt(hwInfo);
}

} // namespace NEO