diff --git a/src/Builder/FrontendDialectTransformer.cpp b/src/Builder/FrontendDialectTransformer.cpp index a913f25b84..bb893539dc 100644 --- a/src/Builder/FrontendDialectTransformer.cpp +++ b/src/Builder/FrontendDialectTransformer.cpp @@ -1629,12 +1629,12 @@ int ImportFrontendModelFile(StringRef model_fname, MLIRContext &context, if (ret != CompilerSuccess) return ret; - auto status = google::protobuf::util::JsonStringToMessage(json, &model); - if (!status.ok()) { - *errorMessage = "Json Model Parsing Failed on " + model_fname.str() + - " with error '" + status.ToString() + "'"; - return InvalidOnnxFormat; - } + // auto status = google::protobuf::util::JsonStringToMessage(json, &model); + // if (!status.ok()) { + // *errorMessage = "Json Model Parsing Failed on " + model_fname.str() + + // " with error '" + status.ToString() + "'"; + // return InvalidOnnxFormat; + // } } else { bool parse_success; if (model_fname.str() == "-") diff --git a/src/Dialect/Mlir/DialectBuilder.cpp b/src/Dialect/Mlir/DialectBuilder.cpp index 1b00f8b0fe..f895f79ccd 100644 --- a/src/Dialect/Mlir/DialectBuilder.cpp +++ b/src/Dialect/Mlir/DialectBuilder.cpp @@ -627,12 +627,14 @@ Value MathBuilder::constant(Type type, double val) const { // If unsigned, create a signless constant, then cast it to unsigned. if (elementType.isUnsignedInteger()) { Type signlessTy = b().getIntegerType(width); - constant = b().create(loc(), - b().getIntegerAttr(signlessTy, APInt(width, (int64_t)val, false, true))); + constant = b().create( + loc(), b().getIntegerAttr(signlessTy, + APInt(width, (int64_t)val, false, true))); constant = castToUnsigned(constant, width); } else { - constant = b().create(loc(), - b().getIntegerAttr(elementType, APInt(width, (int64_t)val, false, true))); + constant = b().create( + loc(), b().getIntegerAttr(elementType, + APInt(width, (int64_t)val, false, true))); } } }) @@ -2263,7 +2265,8 @@ Value LLVMBuilder::constant(Type type, int64_t val) const { assert(type.isSignless() && "LLVM::ConstantOp requires a signless type."); constant = b().create(loc(), type, - b().getIntegerAttr(type, APInt(width, (int64_t)val, false, true))); + b().getIntegerAttr( + type, APInt(width, (int64_t)val, false, true))); } }) .Case([&](Type) {