23 lines
486 B
C++
23 lines
486 B
C++
#pragma once
|
|
|
|
#include "mlir/IR/BuiltinAttributes.h"
|
|
#include "mlir/IR/Operation.h"
|
|
#include "mlir/IR/Value.h"
|
|
|
|
namespace onnx_mlir {
|
|
|
|
struct CompileTimeSource {
|
|
mlir::Operation* source;
|
|
size_t chainLength;
|
|
};
|
|
|
|
std::optional<CompileTimeSource> getCompileTimeSource(mlir::Operation* op);
|
|
|
|
bool isCompileTimeComputable(mlir::Value value);
|
|
|
|
bool isCompileTimeOp(mlir::Operation* op);
|
|
|
|
mlir::DenseElementsAttr getHostConstDenseElementsAttr(mlir::Value value);
|
|
|
|
} // namespace onnx_mlir
|