Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
zhen8838 committed Sep 20, 2024
1 parent 46c948c commit dd31677
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 106 deletions.
6 changes: 4 additions & 2 deletions src/Nncase.Schedule/Schedule/GraphTiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,11 @@ private TreeSolveResult SolvePrimGraph(TileNode primTree, BufferGraph primBuffer
var tileNodeMemoAssgin = tileNodeMemo.ToDictionary(kv => kv.Key, kv => new TileNodeInfo<long>(sol.Value(kv.Value.TripCounts), sol.Value(kv.Value.BackWardExtents), kv.Value.DefUseMap, kv.Value.BufferInfoMap.ToDictionary(p => p.Key, p => new TileNodeBufferInfo<long>(p.Value.Liveness, p.Value.Map, sol.Value(p.Value.Places), sol.Value(p.Value.Shapes), sol.Value(p.Value.SizeVars), sol.Value(p.Value.SizeExprs), p.Value.Masks))));
var tileableNodeMemoAssgin = tileableNodeMemo.ToDictionary(kv => kv.Key, kv => new DomainInfo<long>(sol.Value(kv.Value.TileVars), sol.Value(kv.Value.ForwardExtents), kv.Value.DimsMap));

DumpAssgin(primTree, new TreeSolverPrinter(sol, solver, opNodeMemo, tileNodeMemo, tileableNodeMemo, targetOptions), tileVarConstraints, eachLevelStoreBufferNumsConstrains, levelBufferSizes, levelDataReads, levelDataWrites, memoryCycles, computeCycles, totalCyclesVar);
if (Diagnostics.DumpScope.Current.IsEnabled(Diagnostics.DumpFlags.Tiling)) {
DumpAssgin(primTree, new TreeSolverPrinter(sol, solver, opNodeMemo, tileNodeMemo, tileableNodeMemo, targetOptions), tileVarConstraints, eachLevelStoreBufferNumsConstrains, levelBufferSizes, levelDataReads, levelDataWrites, memoryCycles, computeCycles, totalCyclesVar);

DumpAssgin(primTree, new TreeSolverPythonPrinter(sol, solver, opNodeMemo, tileNodeMemo, tileableNodeMemo, targetOptions), tileVarConstraints, eachLevelStoreBufferNumsConstrains, levelBufferSizes, levelDataReads, levelDataWrites, memoryCycles, computeCycles, totalCyclesVar);
DumpAssgin(primTree, new TreeSolverPythonPrinter(sol, solver, opNodeMemo, tileNodeMemo, tileableNodeMemo, targetOptions), tileVarConstraints, eachLevelStoreBufferNumsConstrains, levelBufferSizes, levelDataReads, levelDataWrites, memoryCycles, computeCycles, totalCyclesVar);
}

return new TreeSolveResult(primBufferGraph, sol.ObjectiveValue(), levelBufferSizesAssgin, levelBufferLifeness, opNodeMemoAssgin, tileNodeMemoAssgin, tileableNodeMemoAssgin, targetOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public Unit Visit(TileNode value, (ITreeNode? Parent, IndentedTextWriter Writer)
{
WriteBuffer(value, i, writer);
var trip = Solution.Value(TileNodeMemo[value].TripCounts[i + 1].Var());

// 2. write loop.
int parentBounds = 0;
if (parent is null)
Expand Down Expand Up @@ -80,7 +81,7 @@ public void WriteBuffer(TileNode value, int i, IndentedTextWriter writer)
}

var place = bufferInfo.Places[i];
for (int sl = 0; sl < place.Length; sl++)
for (int sl = place.Length - 1; sl >= 0; sl--)
{
if (Solution.Value(place[sl].Var()) == 1)
{
Expand Down
103 changes: 0 additions & 103 deletions src/Nncase.Schedule/Schedule/TileGraph/TreeSolverWritesInitializer.cs

This file was deleted.

1 change: 1 addition & 0 deletions src/Nncase.Tests/Targets/UnitTestCPUKernels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ public async Task TestPackMatMul(int[] lhsShape, int[] rhsShape, bool constA, bo

var rule = new Passes.Rules.CPU.PackMatMul(2, Lane);
CompilerServices.TryMatch(pre, rule.Pattern, out var result);

// var posts = new[] { pre }.Concat();
var posts = rule.GetReplaceCandidates(result!, new Passes.RunPassContext());
await RunCases(Path.Join(CompileOptions.DumpDir.ToString(), $"Theory{count}"), feedDict, posts);
Expand Down

0 comments on commit dd31677

Please sign in to comment.