Commit 6322afd2 by Yizhi Liu Committed by Tianqi Chen

[tvm4j] provide error msg for failure function call (#2967)

parent e38d00e2
...@@ -178,6 +178,10 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncCall( ...@@ -178,6 +178,10 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmFuncCall(
int ret = TVMFuncCall(reinterpret_cast<TVMFunctionHandle>(jhandle), int ret = TVMFuncCall(reinterpret_cast<TVMFunctionHandle>(jhandle),
&argValues[0], &argTypes[0], numArgs, &retVal, &retTypeCode); &argValues[0], &argTypes[0], numArgs, &retVal, &retTypeCode);
if (ret != 0) {
return ret;
}
for (auto iter = pushedStrs.cbegin(); iter != pushedStrs.cend(); iter++) { for (auto iter = pushedStrs.cbegin(); iter != pushedStrs.cend(); iter++) {
env->ReleaseStringUTFChars(iter->first, iter->second); env->ReleaseStringUTFChars(iter->first, iter->second);
env->DeleteGlobalRef(iter->first); env->DeleteGlobalRef(iter->first);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment