File: ult_specific_config.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 (95 lines) | stat: -rw-r--r-- 3,832 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
 * Copyright (C) 2021-2025 Intel Corporation
 *
 * SPDX-License-Identifier: MIT
 *
 */

#include "shared/source/built_ins/built_ins.h"
#include "shared/source/command_container/implicit_scaling.h"
#include "shared/source/compiler_interface/default_cache_config.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/api_specific_config.h"
#include "shared/source/memory_manager/compression_selector.h"
#include "shared/source/page_fault_manager/cpu_page_fault_manager.h"
#include "shared/test/common/base_ult_config_listener.h"
#include "shared/test/common/helpers/test_files.h"
#include "shared/test/common/tests_configuration.h"

#include "test_files_setup.h"

namespace NEO {
namespace ImplicitScaling {
bool apiSupport = false;
} // namespace ImplicitScaling

const char *neoMockSettingsFileName = "neo_mock.config";

bool CompressionSelector::preferCompressedAllocation(const AllocationProperties &properties) {
    return false;
}
void CpuPageFaultManager::transferToCpu(void *ptr, size_t size, void *cmdQ) {
}
void CpuPageFaultManager::transferToGpu(void *ptr, void *cmdQ) {
}
void CpuPageFaultManager::allowCPUMemoryEviction(bool evict, void *ptr, PageFaultData &pageFaultData) {
}

void RootDeviceEnvironment::initApiGfxCoreHelper() {
}
const char *apiName = "SHARED";

} // namespace NEO

using namespace NEO;
void cleanTestHelpers() {}

void applyWorkarounds() {
    const std::array<ConstStringRef, 12> builtinIntermediateNames{"copy_buffer_to_buffer.builtin_kernel.spv",
                                                                  "copy_buffer_rect.builtin_kernel.spv",
                                                                  "fill_buffer.builtin_kernel.spv",
                                                                  "copy_buffer_to_image3d.builtin_kernel.spv",
                                                                  "copy_image3d_to_buffer.builtin_kernel.spv",
                                                                  "copy_image_to_image1d.builtin_kernel.spv",
                                                                  "copy_image_to_image2d.builtin_kernel.spv",
                                                                  "copy_image_to_image3d.builtin_kernel.spv",
                                                                  "fill_image1d.builtin_kernel.spv",
                                                                  "fill_image2d.builtin_kernel.spv",
                                                                  "fill_image3d.builtin_kernel.spv",
                                                                  "fill_image1d_buffer.builtin_kernel.spv"};
    auto &storageRegistry = EmbeddedStorageRegistry::getInstance();
    for (auto builtinIntermediateName : builtinIntermediateNames) {
        std::string resource = "__mock_spirv_resource";
        storageRegistry.store(builtinIntermediateName.str(), createBuiltinResource(resource.data(), resource.size() + 1));
    }
}

void setupTestFiles(std::string testBinaryFiles, int32_t revId) {
    testBinaryFiles.append("/");
    testBinaryFiles.append(binaryNameSuffix);
    testBinaryFiles.append("/");
    testBinaryFiles.append(std::to_string(revId));
    testBinaryFiles.append("/");
    testBinaryFiles.append(testFiles);
    testFiles = testBinaryFiles;

    std::string nClFiles = NEO_SHARED_TEST_FILES_DIR;
    nClFiles.append("/");
    clFiles = nClFiles;
}

std::string getBaseExecutionDir() {
    if (!isAubTestMode(testMode)) {
        return "shared/";
    }
    return "";
}

bool isChangeDirectoryRequired() {
    return true;
}

void addUltListener(::testing::TestEventListeners &listeners) {
    listeners.Append(new BaseUltConfigListener);
}