This commit is contained in:
@@ -136,7 +136,6 @@ static std::optional<int32_t> getComputeCoreId(SpatCompute compute) {
|
||||
|
||||
struct ComputeMotifInfo {
|
||||
uint64_t instructionCount = 0;
|
||||
uint64_t weightedMvmCount = 0;
|
||||
uint64_t weightedVmmCount = 0;
|
||||
};
|
||||
|
||||
@@ -285,8 +284,6 @@ void emitMotifProfile(func::FuncOp funcOp) {
|
||||
ComputeMotifInfo& info = computeInfos[index];
|
||||
for (Operation& op : compute.getBody().front()) {
|
||||
info.instructionCount++;
|
||||
if (isa<spatial::SpatMVMOp>(&op))
|
||||
info.weightedMvmCount++;
|
||||
if (isa<spatial::SpatVMMOp>(&op))
|
||||
info.weightedVmmCount++;
|
||||
}
|
||||
@@ -400,7 +397,7 @@ void emitMotifProfile(func::FuncOp funcOp) {
|
||||
wideWeightedVmmLevels256 += count >= 256;
|
||||
}
|
||||
|
||||
using ShapeKey = std::tuple<uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t>;
|
||||
using ShapeKey = std::tuple<uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t>;
|
||||
SmallVector<ShapeKey> weightedVmmShapeKeys;
|
||||
for (auto [index, compute] : llvm::enumerate(computes)) {
|
||||
const ComputeMotifInfo& info = computeInfos[index];
|
||||
@@ -408,7 +405,6 @@ void emitMotifProfile(func::FuncOp funcOp) {
|
||||
continue;
|
||||
weightedVmmShapeKeys.push_back({info.instructionCount,
|
||||
info.weightedVmmCount,
|
||||
info.weightedMvmCount,
|
||||
static_cast<uint64_t>(compute.getWeights().size()),
|
||||
static_cast<uint64_t>(compute.getInputs().size()),
|
||||
static_cast<uint64_t>(parents[index].size()),
|
||||
@@ -461,14 +457,13 @@ void emitMotifProfile(func::FuncOp funcOp) {
|
||||
|
||||
for (size_t rank = 0, end = std::min<size_t>(weightedVmmShapeCounts.size(), 5); rank < end; ++rank) {
|
||||
auto [count, shape] = weightedVmmShapeCounts[rank];
|
||||
auto [insts, vmmOps, mvmOps, weights, inputs, fanIn, fanOut] = shape;
|
||||
auto [insts, vmmOps, weights, inputs, fanIn, fanOut] = shape;
|
||||
llvm::errs() << llvm::formatv("[DCP-MOTIF] wvmmShape rank={0} count={1} insts={2} vmmOps={3} "
|
||||
"mvmOps={4} weights={5} inputs={6} fanIn={7} fanOut={8}\n",
|
||||
"weights={4} inputs={5} fanIn={6} fanOut={7}\n",
|
||||
rank,
|
||||
count,
|
||||
insts,
|
||||
vmmOps,
|
||||
mvmOps,
|
||||
weights,
|
||||
inputs,
|
||||
fanIn,
|
||||
|
||||
Reference in New Issue
Block a user