Skip to content

[Optimizer][D2M] Keep D2MOp in L1 chain #7025

@sgholamiTT

Description

@sgholamiTT

After receiving this comment and further discussion with @rpavlovicTT and @odjuricicTT, we decided to break the PR in two parts:

  1. Just supporting D2M_SubgraphOp through optimizer and treat the op as a single op that reads/writes to DRAM. That is what this PR does.
  2. Support adding D2M_SubgraphOp to an existing L1 chain.
    • One way to support this is to modify getUniqueTestConfigs function in OptimizerUtils.cpp (as done here). Though this could break the existing logic of the Optimizer.
    • One other way is to modify call site and special-case D2M_SubgraphOp in ShardSolver.cpp, eg:
// ShardSolver.cpp
llvm::SmallVector<OpConfig> testConfigs;
if (llvm::isa<ttnn::D2MSubgraphOp>(consumerOp)) {
  for (const OpConfig &c : consumerConfigs) {
    testConfigs.push_back(c);
  }
} else {
  testConfigs = optimizer_utils::getUniqueTestConfigs(
      consumerConfigs, shouldUseIgnorePhysicalLayout(consumerOp));
}

There might be better ways to support this as well.

This issue tracks the resolution of number 2 mentioned above.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions