diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index 6d0c26290f2..2c18b823d6a --- a/build.sh +++ b/build.sh @@ -304,6 +304,7 @@ checkopts() LITE_LANGUAGE="cpp" elif [[ "$OPTARG" == "java" ]]; then LITE_LANGUAGE="java" + ENABLE_CONVERTER="off" elif [[ "$OPTARG" == "object-c" ]]; then LITE_LANGUAGE="object-c" else diff --git a/mindspore/lite/src/kernel_registry.cc b/mindspore/lite/src/kernel_registry.cc index a245e285f1a..bda5dbedd50 100644 --- a/mindspore/lite/src/kernel_registry.cc +++ b/mindspore/lite/src/kernel_registry.cc @@ -116,8 +116,11 @@ kernel::LiteKernel *KernelRegistry::GetKernel(const std::vector &in_te auto creator = GetCreator(key); if (creator != nullptr) { auto kernel = creator(in_tensors, out_tensors, parameter, ctx, key, primitive); - return kernel; + if (kernel != nullptr) { + return kernel; + } } + free(parameter); return nullptr; }