Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Compiler/CompilerOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,8 @@ static llvm::cl::opt<bool, true> verifyInputTensorsOpt("verifyInputTensors",
llvm::cl::desc(
"Verify input tensors whenever the entry point function is called.\n"
"Data type and shape are verified. Enable this may introduce overhead "
"at runtime."),
llvm::cl::location(verifyInputTensors), llvm::cl::init(false),
"at runtime. Default is true"),
llvm::cl::location(verifyInputTensors), llvm::cl::init(true),
llvm::cl::cat(OnnxMlirOptions));

static llvm::cl::opt<bool, true> allowSortingOpt("allowSorting",
Expand Down
2 changes: 2 additions & 0 deletions src/Conversion/KrnlToLLVM/KrnlEntryPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ class KrnlEntryPointOpLowering : public OpRewritePattern<KrnlEntryPointOp> {
auto JSONItemType = JSONItem->getString("type");
assert(JSONItemType && "failed to get type");
Type elemTy = parseType(JSONItemType.value(), rewriter.getContext());
if (elemTy) {
std::string elemTyStr;
llvm::raw_string_ostream dstream(elemTyStr);
dstream << elemTy;
Expand All @@ -461,6 +462,7 @@ class KrnlEntryPointOpLowering : public OpRewritePattern<KrnlEntryPointOp> {
"Wrong data type for the input " + std::to_string(i) + ": expect " +
elemTyStr,
false);
}

// Verify data rank.
auto JSONDimArray = JSONItem->getArray("dims");
Expand Down
Loading