Skip to content

Commit

Permalink
Add support for arrays in CoreRangeSet (#14967)
Browse files Browse the repository at this point in the history
### Ticket
- #14962

### Problem description
For the upcoming matmul1d op that supports inputs sharded on arbitrary
cores, the ordering of the cores must be accessible in the program
factory. This is so that we can pick a ring such that the NOC directions
are optimized according to the following:
<img width="1016" alt="image"
src="https://github.com/user-attachments/assets/730c72e3-f79c-4b3d-a281-50c19db252ba">


### What's changed
- Added support to pass in arrays to the CoreRangeSet object.
  • Loading branch information
avoraTT authored Nov 19, 2024
1 parent a356429 commit d5f96cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ttnn/cpp/pybind11/tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ void tensor_mem_config_module(py::module& m_tensor) {

auto pyCoreRangeSet = static_cast<py::class_<CoreRangeSet>>(m_tensor.attr("CoreRangeSet"));
pyCoreRangeSet.def(py::init<>([](const std::set<CoreRange>& core_ranges) { return CoreRangeSet(core_ranges); }))
.def(py::init<>([](const std::vector<CoreRange>& core_ranges) { return CoreRangeSet(tt::stl::Span<const CoreRange>(core_ranges)); }))
.def(
"bounding_box",
&CoreRangeSet::bounding_box,
Expand Down

0 comments on commit d5f96cc

Please sign in to comment.