-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#0: Hoist SubDeviceManager/Lock-Step Allocator to MeshDevice
- Loading branch information
Showing
12 changed files
with
518 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-FileCopyrightText: © 2025 Tenstorrent Inc. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#include <gtest/gtest.h> | ||
#include <memory> | ||
|
||
#include <mesh_device.hpp> | ||
#include "tests/tt_metal/tt_metal/common/multi_device_fixture.hpp" | ||
|
||
namespace tt::tt_metal::distributed::test { | ||
|
||
using MeshAllocatorTest = T3000MultiDeviceFixture; | ||
|
||
TEST_F(MeshAllocatorTest, BasicAllocationSanityCheck) { | ||
const size_t allocation_size = 1024 * 8; // 1KB | ||
const tt::tt_metal::BufferType buffer_type = tt::tt_metal::BufferType::L1; | ||
|
||
auto config = InterleavedBufferConfig{ | ||
.device = mesh_device_.get(), | ||
.size = allocation_size, | ||
.page_size = 1024, | ||
.buffer_type = buffer_type, | ||
.buffer_layout = tt::tt_metal::TensorMemoryLayout::INTERLEAVED}; | ||
|
||
auto buffer = CreateBuffer(config); | ||
|
||
EXPECT_TRUE(buffer->is_allocated()); | ||
EXPECT_EQ(buffer->size(), allocation_size); | ||
EXPECT_EQ(buffer->buffer_type(), buffer_type); | ||
} | ||
|
||
} // namespace tt::tt_metal::distributed::test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.