remove expired files and includes; update readme
This commit is contained in:
parent
8365d24ded
commit
58655710f5
14
README.md
14
README.md
|
@ -24,18 +24,16 @@ scalehls-opt -convert-to-hlscpp test/EmitHLSCpp/test_*.mlir | scalehls-translate
|
|||
|
||||
### QoREstimation Pass
|
||||
1. Implement comprehensive partition-aware II analysis.
|
||||
2. Consider the case of flattened inner loop under a pipelined region.
|
||||
3. Support read latency from profiling data.
|
||||
4. Support operation chainning.
|
||||
2. Support read latency from profiling data.
|
||||
3. Support operation chainning.
|
||||
|
||||
### PragmaDSE Pass
|
||||
|
||||
### EmitHLSCpp
|
||||
1. Emitting array_pragma operation.
|
||||
2. Support AffineFor iter_args feature.
|
||||
3. TODOs in EmitHLSCpp.cpp.
|
||||
4. Support memref/tensor cast/view/subview operations.
|
||||
5. Support atomic/complex/extention -related operations.
|
||||
1. Support AffineFor iter_args feature.
|
||||
2. TODOs in EmitHLSCpp.cpp.
|
||||
3. Support memref/tensor cast/view/subview operations.
|
||||
4. Support atomic/complex/extention -related operations.
|
||||
|
||||
## References
|
||||
1. [MLIR Documents](https://mlir.llvm.org)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#ifndef SCALEHLS_ANALYSIS_QORESTIMATION_H
|
||||
#define SCALEHLS_ANALYSIS_QORESTIMATION_H
|
||||
|
||||
#include "INIReader.h"
|
||||
#include "Visitor.h"
|
||||
#include "mlir/Dialect/Affine/IR/AffineOps.h"
|
||||
#include "mlir/Pass/Pass.h"
|
||||
|
@ -74,13 +75,13 @@ public:
|
|||
};
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// QoREstimator Class Declaration
|
||||
// HLSCppEstimator Class Declaration
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
class QoREstimator : public HLSCppVisitorBase<QoREstimator, bool>,
|
||||
class HLSCppEstimator : public HLSCppVisitorBase<HLSCppEstimator, bool>,
|
||||
public HLSCppToolBase {
|
||||
public:
|
||||
explicit QoREstimator(OpBuilder &builder, std::string targetSpecPath,
|
||||
explicit HLSCppEstimator(OpBuilder &builder, std::string targetSpecPath,
|
||||
std::string opLatencyPath);
|
||||
|
||||
// For storing the scheduled time stamp of operations;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//===-------------------------------------------------------*- tablegen -*-===//
|
||||
// Deprecated
|
||||
// Deprecated. Will be removed somehow in someday.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef SCALEHLS_DIALECT_HLSCPP_PRAGMAOPS_TD
|
||||
|
|
|
@ -120,7 +120,7 @@ inline static char *rstrip(char *s) {
|
|||
}
|
||||
|
||||
/* Return pointer to first non-whitespace char in given string. */
|
||||
inline static char *lskip(const char *s) {
|
||||
inline static char *lskip(char *s) {
|
||||
while (*s && isspace((unsigned char)(*s)))
|
||||
s++;
|
||||
return (char *)s;
|
||||
|
@ -129,7 +129,7 @@ inline static char *lskip(const char *s) {
|
|||
/* Return pointer to first char (of chars) or inline comment in given string,
|
||||
or pointer to null at end of string if neither found. Inline comment must
|
||||
be prefixed by a whitespace character to register as a comment. */
|
||||
inline static char *find_chars_or_comment(const char *s, const char *chars) {
|
||||
inline static char *find_chars_or_comment(char *s, const char *chars) {
|
||||
#if INI_ALLOW_INLINE_COMMENTS
|
||||
int was_space = 0;
|
||||
while (*s && (!chars || !strchr(chars, *s)) &&
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#include "Analysis/QoREstimation.h"
|
||||
#include "Analysis/Passes.h"
|
||||
#include "Dialect/HLSCpp/HLSCpp.h"
|
||||
#include "INIReader.h"
|
||||
#include "Visitor.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace mlir;
|
||||
|
@ -90,11 +88,11 @@ void HLSCppAnalyzer::analyzeModule(ModuleOp module) {
|
|||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// QoREstimator Class Definition
|
||||
// HLSCppEstimator Class Definition
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// Estimator constructor.
|
||||
QoREstimator::QoREstimator(OpBuilder &builder, string targetSpecPath,
|
||||
HLSCppEstimator::HLSCppEstimator(OpBuilder &builder, string targetSpecPath,
|
||||
string opLatencyPath)
|
||||
: HLSCppToolBase(builder) {
|
||||
|
||||
|
@ -116,7 +114,8 @@ QoREstimator::QoREstimator(OpBuilder &builder, string targetSpecPath,
|
|||
llvm::outs() << latency << "\n";
|
||||
}
|
||||
|
||||
void QoREstimator::alignBlockSchedule(Block &block, ScheduleMap &opScheduleMap,
|
||||
void HLSCppEstimator::alignBlockSchedule(Block &block,
|
||||
ScheduleMap &opScheduleMap,
|
||||
unsigned opSchedule) {
|
||||
for (auto &op : block) {
|
||||
if (auto child = dyn_cast<mlir::AffineForOp>(op))
|
||||
|
@ -125,7 +124,7 @@ void QoREstimator::alignBlockSchedule(Block &block, ScheduleMap &opScheduleMap,
|
|||
}
|
||||
}
|
||||
|
||||
unsigned QoREstimator::getBlockSchedule(Block &block,
|
||||
unsigned HLSCppEstimator::getBlockSchedule(Block &block,
|
||||
ScheduleMap &opScheduleMap) {
|
||||
unsigned blockSchedule = 0;
|
||||
|
||||
|
@ -161,7 +160,7 @@ unsigned QoREstimator::getBlockSchedule(Block &block,
|
|||
return blockSchedule;
|
||||
}
|
||||
|
||||
unsigned QoREstimator::getBlockII(Block &block, ScheduleMap &opScheduleMap,
|
||||
unsigned HLSCppEstimator::getBlockII(Block &block, ScheduleMap &opScheduleMap,
|
||||
MemAccessList &memLoadList,
|
||||
MemAccessList &memStoreList,
|
||||
unsigned initInterval) {
|
||||
|
@ -209,7 +208,7 @@ unsigned QoREstimator::getBlockII(Block &block, ScheduleMap &opScheduleMap,
|
|||
return initInterval;
|
||||
}
|
||||
|
||||
bool QoREstimator::visitOp(AffineForOp op) {
|
||||
bool HLSCppEstimator::visitOp(AffineForOp op) {
|
||||
auto &body = op.getLoopBody();
|
||||
if (body.getBlocks().size() != 1)
|
||||
op.emitError("has zero or more than one basic blocks.");
|
||||
|
@ -298,9 +297,9 @@ bool QoREstimator::visitOp(AffineForOp op) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool QoREstimator::visitOp(AffineIfOp op) { return true; }
|
||||
bool HLSCppEstimator::visitOp(AffineIfOp op) { return true; }
|
||||
|
||||
void QoREstimator::estimateBlock(Block &block) {
|
||||
void HLSCppEstimator::estimateBlock(Block &block) {
|
||||
for (auto &op : block) {
|
||||
if (dispatchVisitor(&op))
|
||||
continue;
|
||||
|
@ -308,7 +307,7 @@ void QoREstimator::estimateBlock(Block &block) {
|
|||
}
|
||||
}
|
||||
|
||||
void QoREstimator::estimateFunc(FuncOp func) {
|
||||
void HLSCppEstimator::estimateFunc(FuncOp func) {
|
||||
if (func.getBlocks().size() != 1)
|
||||
func.emitError("has zero or more than one basic blocks.");
|
||||
|
||||
|
@ -319,7 +318,7 @@ void QoREstimator::estimateFunc(FuncOp func) {
|
|||
setAttrValue(func, "latency", latency);
|
||||
}
|
||||
|
||||
void QoREstimator::estimateModule(ModuleOp module) {
|
||||
void HLSCppEstimator::estimateModule(ModuleOp module) {
|
||||
for (auto &op : module) {
|
||||
if (auto func = dyn_cast<FuncOp>(op)) {
|
||||
estimateFunc(func);
|
||||
|
@ -342,7 +341,7 @@ struct QoREstimation : public scalehls::QoREstimationBase<QoREstimation> {
|
|||
analyzer.analyzeModule(getOperation());
|
||||
|
||||
// Estimate performance and resource utilization.
|
||||
QoREstimator estimator(builder, targetSpec, opLatency);
|
||||
HLSCppEstimator estimator(builder, targetSpec, opLatency);
|
||||
estimator.estimateModule(getOperation());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
//===------------------------------------------------------------*- C++ -*-===//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Dialect/HLSCpp/HLSCpp.h"
|
||||
|
||||
using namespace mlir;
|
||||
using namespace scalehls;
|
||||
using namespace hlscpp;
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "Analysis/QoREstimation.h"
|
||||
#include "Dialect/HLSCpp/HLSCpp.h"
|
||||
#include "INIReader.h"
|
||||
#include "Transforms/Passes.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
Loading…
Reference in New Issue