automatic code-reformat
All checks were successful
Validate Operations / validate-operations (push) Successful in 18m22s
All checks were successful
Validate Operations / validate-operations (push) Successful in 18m22s
This commit is contained in:
@@ -485,7 +485,7 @@ DCPAnalysisResult GraphDCP::getResult() {
|
||||
size_t i = 0;
|
||||
for (auto node : nodes) {
|
||||
ret.computeToCPUMap[node->getSpatWeightedCompute()] = cpu;
|
||||
if (i++ == nodes.size() - 1){
|
||||
if (i++ == nodes.size() - 1) {
|
||||
ret.isLastComputeOfACpu.insert(node->getSpatWeightedCompute());
|
||||
ret.cpuToLastComputeMap[cpu] = node->getSpatWeightedCompute();
|
||||
}
|
||||
|
||||
@@ -43,7 +43,5 @@ bool TaskDCP::hasDescendent(TaskDCP* child) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//TODO fare qualcosa di sensato
|
||||
int TaskDCP::computeWeight(GraphDCP* graph, CPU cpu) {
|
||||
return orig_weight;
|
||||
}
|
||||
// TODO fare qualcosa di sensato
|
||||
int TaskDCP::computeWeight(GraphDCP* graph, CPU cpu) { return orig_weight; }
|
||||
|
||||
@@ -75,11 +75,11 @@ public:
|
||||
alst = val;
|
||||
}
|
||||
bool hasDescendent(TaskDCP* child);
|
||||
int64_t Id() const { return (int64_t)spatWeightedCompute.getAsOpaquePointer(); }
|
||||
int64_t Id() const { return (int64_t) spatWeightedCompute.getAsOpaquePointer(); }
|
||||
|
||||
bool isCP() const { return alst == aest; }
|
||||
bool isScheduled() const { return scheduledCPU.has_value(); }
|
||||
onnx_mlir::spatial::SpatWeightedCompute getSpatWeightedCompute(){return spatWeightedCompute;}
|
||||
onnx_mlir::spatial::SpatWeightedCompute getSpatWeightedCompute() { return spatWeightedCompute; }
|
||||
|
||||
friend std::optional<Edge_pair> addEdge(TaskDCP* parent, TaskDCP* child, Weight_t weight);
|
||||
friend void removeEdge(TaskDCP* parent, TaskDCP* child);
|
||||
|
||||
@@ -71,12 +71,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
auto begin() {
|
||||
return storage.begin();
|
||||
}
|
||||
|
||||
auto end() {
|
||||
return storage.end();
|
||||
}
|
||||
auto begin() { return storage.begin(); }
|
||||
|
||||
auto end() { return storage.end(); }
|
||||
};
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "mlir/IR/BuiltinTypeInterfaces.h"
|
||||
|
||||
#include "llvm/Support/Casting.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
@@ -50,10 +52,9 @@ inline int64_t getSpatWeightCompute(onnx_mlir::spatial::SpatWeightedCompute spat
|
||||
int64_t tot = 0;
|
||||
for (auto& region : spatWeightedCompute.getBody()) {
|
||||
for (auto& inst : region) {
|
||||
for(auto result : inst.getResults()){
|
||||
if(auto element = llvm::dyn_cast<mlir::ShapedType>(result.getType()))
|
||||
tot += onnx_mlir::getSizeInBytes(element);
|
||||
}
|
||||
for (auto result : inst.getResults())
|
||||
if (auto element = llvm::dyn_cast<mlir::ShapedType>(result.getType()))
|
||||
tot += onnx_mlir::getSizeInBytes(element);
|
||||
}
|
||||
}
|
||||
return tot;
|
||||
|
||||
@@ -413,7 +413,7 @@ struct ChannelBroadcastReceiveOpInterface
|
||||
outputTensor,
|
||||
rewriter.getI32IntegerAttr(numElements * elementSize),
|
||||
rewriter.getI32IntegerAttr(srcCoreId.value()))
|
||||
.getOutput();
|
||||
.getOutput();
|
||||
|
||||
replaceOpWithBufferizedValues(rewriter, op, newValue);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user