mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-23 03:33:13 +08:00
Update aubstream interface: use product family from aubstream
don't build aub tests when aubstream is not available use only mock aub manager in ULTs Related-To: NEO-4446 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4995bddb89
commit
0b3582a93b
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "shared/test/common/mocks/mock_aub_manager.h"
|
||||
|
||||
namespace NEO {
|
||||
aub_stream::AubManager *createAubManager(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, uint32_t stepping, bool localMemorySupported, uint32_t streamMode, uint64_t gpuAddressSpace) {
|
||||
return new MockAubManager(productFamily, devicesCount, memoryBankSize, stepping, localMemorySupported, streamMode, gpuAddressSpace);
|
||||
aub_stream::AubManager *createAubManager(const aub_stream::AubManagerOptions &options) {
|
||||
return new MockAubManager(options);
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -23,8 +23,10 @@ void MockAubCenterFixture::setMockAubCenter(RootDeviceEnvironment &rootDeviceEnv
|
||||
void MockAubCenterFixture::setMockAubCenter(RootDeviceEnvironment &rootDeviceEnvironment, CommandStreamReceiverType commandStreamReceiverType) {
|
||||
if (testMode != TestMode::AubTests && testMode != TestMode::AubTestsWithTbx) {
|
||||
rootDeviceEnvironment.initGmm();
|
||||
auto mockAubCenter = std::make_unique<MockAubCenter>(defaultHwInfo.get(), *rootDeviceEnvironment.getGmmHelper(), false, "", commandStreamReceiverType);
|
||||
mockAubCenter->aubManager = std::make_unique<MockAubManager>();
|
||||
auto mockAubCenter = std::make_unique<MockAubCenter>(rootDeviceEnvironment.getHardwareInfo(), *rootDeviceEnvironment.getGmmHelper(), false, "", commandStreamReceiverType);
|
||||
if (!mockAubCenter->aubManager) {
|
||||
mockAubCenter->aubManager = std::make_unique<MockAubManager>();
|
||||
}
|
||||
rootDeviceEnvironment.aubCenter.reset(mockAubCenter.release());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,14 +70,7 @@ class MockAubManager : public aub_stream::AubManager {
|
||||
|
||||
public:
|
||||
MockAubManager(){};
|
||||
MockAubManager(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, uint32_t stepping, bool localMemorySupported, uint32_t streamMode, uint64_t gpuAddressSpace) {
|
||||
mockAubManagerParams.productFamily = productFamily;
|
||||
mockAubManagerParams.devicesCount = devicesCount;
|
||||
mockAubManagerParams.memoryBankSize = memoryBankSize;
|
||||
mockAubManagerParams.stepping = stepping;
|
||||
mockAubManagerParams.localMemorySupported = localMemorySupported;
|
||||
mockAubManagerParams.streamMode = streamMode;
|
||||
mockAubManagerParams.gpuAddressSpace = gpuAddressSpace;
|
||||
MockAubManager(const aub_stream::AubManagerOptions &inputOptions) : options(inputOptions) {
|
||||
}
|
||||
~MockAubManager() override {}
|
||||
|
||||
@@ -160,15 +153,7 @@ class MockAubManager : public aub_stream::AubManager {
|
||||
int hintToWriteMemory = 0;
|
||||
size_t writeMemoryPageSizePassed = 0;
|
||||
|
||||
struct MockAubManagerParams {
|
||||
uint32_t productFamily = 0;
|
||||
int32_t devicesCount = 0;
|
||||
uint64_t memoryBankSize = 0;
|
||||
uint32_t stepping = 0;
|
||||
bool localMemorySupported = false;
|
||||
uint32_t streamMode = 0xFFFFFFFF;
|
||||
uint64_t gpuAddressSpace = 0xFFFFFFFFFFFF;
|
||||
} mockAubManagerParams;
|
||||
aub_stream::AubManagerOptions options{};
|
||||
|
||||
protected:
|
||||
HardwareContext *hardwareContext = nullptr;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2021 Intel Corporation
|
||||
# Copyright (C) 2021-2022 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -22,15 +22,9 @@ elseif(UNIX AND NOT DISABLE_WDDM_LINUX)
|
||||
${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory.cpp
|
||||
)
|
||||
endif()
|
||||
if(DEFINED AUB_STREAM_PROJECT_NAME)
|
||||
list(APPEND NEO_SHARED_unit_tests_configurations
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/aub_stream_mocks/aub_stream_interface_mock.cpp
|
||||
)
|
||||
else()
|
||||
list(APPEND NEO_SHARED_unit_tests_configurations
|
||||
${NEO_SOURCE_DIR}/shared/source/aub/aub_stream_interface.cpp
|
||||
)
|
||||
endif()
|
||||
list(APPEND NEO_SHARED_unit_tests_configurations
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/aub_stream_mocks/aub_stream_interface_mock.cpp
|
||||
)
|
||||
add_library(neo_unit_tests_config OBJECT EXCLUDE_FROM_ALL ${NEO_SHARED_unit_tests_configurations})
|
||||
|
||||
set_target_properties(neo_unit_tests_config PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
Reference in New Issue
Block a user