Skip to content

Commit d4d5971

Browse files
Add gpuAddressSpace param to AubManager::create()
Related-To: NEO-2941 Change-Id: I5d6a35748ec4752c830a6ed329b5ca4a3d6627f8 Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
1 parent 61ba7a8 commit d4d5971

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

opencl/source/aub/aub_center.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "third_party/aub_stream/headers/aubstream.h"
1818

1919
namespace NEO {
20-
extern aub_stream::AubManager *createAubManager(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode);
20+
extern aub_stream::AubManager *createAubManager(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode, uint64_t gpuAddressSpace);
2121

2222
AubCenter::AubCenter(const HardwareInfo *pHwInfo, bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType) {
2323
if (DebugManager.flags.UseAubStream.get()) {
@@ -37,7 +37,7 @@ AubCenter::AubCenter(const HardwareInfo *pHwInfo, bool localMemoryEnabled, const
3737
aub_stream::setTbxServerIp(DebugManager.flags.TbxServer.get());
3838
aub_stream::setTbxServerPort(DebugManager.flags.TbxPort.get());
3939

40-
aubManager.reset(createAubManager(pHwInfo->platform.eProductFamily, devicesCount, memoryBankSize, localMemoryEnabled, aubStreamMode));
40+
aubManager.reset(createAubManager(pHwInfo->platform.eProductFamily, devicesCount, memoryBankSize, localMemoryEnabled, aubStreamMode, pHwInfo->capabilityTable.gpuAddressSpace));
4141
}
4242
addressMapper = std::make_unique<AddressMapper>();
4343
streamProvider = std::make_unique<AubFileStreamProvider>();

opencl/source/aub/aub_stream_interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "opencl/source/aub/aub_center.h"
99
using namespace aub_stream;
1010
namespace NEO {
11-
AubManager *createAubManager(uint32_t gfxFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode) {
12-
return AubManager::create(gfxFamily, devicesCount, memoryBankSize, localMemorySupported, streamMode);
11+
AubManager *createAubManager(uint32_t gfxFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode, uint64_t gpuAddressSpace) {
12+
return AubManager::create(gfxFamily, devicesCount, memoryBankSize, localMemorySupported, streamMode, gpuAddressSpace);
1313
}
1414
} // namespace NEO

opencl/source/aub_mem_dump/aub_stream_stubs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ std::string tbxServerIp = "127.0.0.1";
1515

1616
namespace aub_stream {
1717

18-
AubManager *AubManager::create(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSizeInGB, bool localMemorySupported, uint32_t streamMode) {
18+
AubManager *AubManager::create(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSizeInGB, bool localMemorySupported, uint32_t streamMode, uint64_t gpuAddressSpace) {
1919
return nullptr;
2020
}
2121

opencl/test/unit_test/aub/aub_center_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ TEST(AubCenter, GivenUseAubStreamDebugVariableSetWhenAubCenterIsCreatedThenCreat
3131
DebugManagerStateRestore restorer;
3232
DebugManager.flags.UseAubStream.set(false);
3333

34-
MockAubManager *mockAubManager = new MockAubManager(platformDevices[0]->platform.eProductFamily, 4, 8 * MB, true, aub_stream::mode::aubFile);
34+
MockAubManager *mockAubManager = new MockAubManager(platformDevices[0]->platform.eProductFamily, 4, 8 * MB, true, aub_stream::mode::aubFile, platformDevices[0]->capabilityTable.gpuAddressSpace);
3535
MockAubCenter mockAubCenter(platformDevices[0], false, "", CommandStreamReceiverType::CSR_AUB);
3636
mockAubCenter.aubManager = std::unique_ptr<MockAubManager>(mockAubManager);
3737

opencl/test/unit_test/aub_stream_mocks/aub_stream_interface_mock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "opencl/test/unit_test/mocks/mock_aub_manager.h"
99

1010
namespace NEO {
11-
aub_stream::AubManager *createAubManager(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode) {
12-
return new MockAubManager(productFamily, devicesCount, memoryBankSize, localMemorySupported, streamMode);
11+
aub_stream::AubManager *createAubManager(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode, uint64_t gpuAddressSpace) {
12+
return new MockAubManager(productFamily, devicesCount, memoryBankSize, localMemorySupported, streamMode, gpuAddressSpace);
1313
}
1414
} // namespace NEO

opencl/test/unit_test/mocks/mock_aub_manager.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ class MockAubManager : public aub_stream::AubManager {
5555

5656
public:
5757
MockAubManager(){};
58-
MockAubManager(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode) {
58+
MockAubManager(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode, uint64_t gpuAddressSpace) {
5959
mockAubManagerParams.productFamily = productFamily;
6060
mockAubManagerParams.devicesCount = devicesCount;
6161
mockAubManagerParams.memoryBankSize = memoryBankSize;
6262
mockAubManagerParams.localMemorySupported = localMemorySupported;
6363
mockAubManagerParams.streamMode = streamMode;
64+
mockAubManagerParams.gpuAddressSpace = gpuAddressSpace;
6465
}
6566
~MockAubManager() override {}
6667

@@ -136,6 +137,7 @@ class MockAubManager : public aub_stream::AubManager {
136137
uint64_t memoryBankSize = 0;
137138
bool localMemorySupported = false;
138139
uint32_t streamMode = 0xFFFFFFFF;
140+
uint64_t gpuAddressSpace = 0xFFFFFFFFFFFF;
139141
} mockAubManagerParams;
140142

141143
protected:

third_party/aub_stream/headers/aub_manager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class AubManager {
3535
virtual void writePhysicalMemoryPages(const void *memory, std::vector<PageInfo> &pages, size_t size, int hint) = 0;
3636
virtual void freeMemory(uint64_t gfxAddress, size_t size) = 0;
3737

38-
static AubManager *create(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode);
38+
static AubManager *create(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize,
39+
bool localMemorySupported, uint32_t streamMode, uint64_t gpuAddressSpace);
3940
};
4041

4142
} // namespace aub_stream

0 commit comments

Comments
 (0)