mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
The "disasm" option in ocloc was not validate new acronyms. despite handling them in "compile". This PR is fixing the issue - ocloc disasm supports new & deprecated acronyms. https://github.com/intel/compute-runtime/issues/582 Signed-off-by: Daria Hinz <daria.hinz@intel.com> Related-To: NEO-7509
58 lines
1.7 KiB
C++
58 lines
1.7 KiB
C++
/*
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "shared/offline_compiler/source/offline_compiler.h"
|
|
#include "shared/source/os_interface/os_inc_base.h"
|
|
#include "shared/test/common/helpers/test_files.h"
|
|
#include "shared/test/common/mocks/mock_compilers.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
#include "mock/mock_iga_dll_guard.h"
|
|
|
|
class Environment : public ::testing::Environment {
|
|
public:
|
|
Environment(const std::string &devicePrefix, const std::string productConfig, const std::string &familyNameWithType)
|
|
: devicePrefix(devicePrefix), productConfig(productConfig), familyNameWithType(familyNameWithType) {
|
|
}
|
|
|
|
void SetInputFileName( // NOLINT(readability-identifier-naming)
|
|
const std::string filename) {
|
|
|
|
retrieveBinaryKernelFilename(igcDebugVars.fileName, filename + "_", ".bin");
|
|
retrieveBinaryKernelFilename(fclDebugVars.fileName, filename + "_", ".bc");
|
|
|
|
NEO::setIgcDebugVars(igcDebugVars);
|
|
NEO::setFclDebugVars(fclDebugVars);
|
|
}
|
|
|
|
void SetUp() override {
|
|
mockIgaDllGuard.enable();
|
|
mockCompilerGuard.Enable();
|
|
SetInputFileName("copybuffer");
|
|
}
|
|
|
|
void TearDown() override {
|
|
mockCompilerGuard.Disable();
|
|
mockIgaDllGuard.disable();
|
|
}
|
|
|
|
NEO::MockCompilerDebugVars igcDebugVars;
|
|
NEO::MockCompilerDebugVars fclDebugVars;
|
|
|
|
void (*igcSetDebugVarsFPtr)(NEO::MockCompilerDebugVars &debugVars);
|
|
void (*fclSetDebugVarsFPtr)(NEO::MockCompilerDebugVars &debugVars);
|
|
|
|
NEO::MockCompilerEnableGuard mockCompilerGuard;
|
|
NEO::MockIgaDllGuard mockIgaDllGuard;
|
|
|
|
const std::string devicePrefix;
|
|
const std::string productConfig;
|
|
const std::string familyNameWithType;
|
|
};
|