This is an automated email from the ASF dual-hosted git repository. tqchen pushed a commit to branch json-small-str in repository https://gitbox.apache.org/repos/asf/tvm.git
commit 287e5cb33b333e232de0112ca6d27dcdba477403 Author: tqchen <[email protected]> AuthorDate: Wed Jul 30 17:27:02 2025 -0400 checkin --- src/runtime/vm/ndarray_cache_support.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/runtime/vm/ndarray_cache_support.cc b/src/runtime/vm/ndarray_cache_support.cc index d91669016d..31f11e7ee7 100644 --- a/src/runtime/vm/ndarray_cache_support.cc +++ b/src/runtime/vm/ndarray_cache_support.cc @@ -378,7 +378,14 @@ TVM_FFI_STATIC_INIT_BLOCK({ names.push_back(args[i].cast<String>()); } *rv = ParamModuleNode::GetParamByName(names); - }); + }) + .def("ffi.picojson.parse", [](const String& json_str) { + picojson::value json_info; + std::string err = picojson::parse(json_info, json_str); + if (!err.empty()) { + LOG(FATAL) << "Failed to parse JSON: err. The JSON string is:" << json_str; + } + }); }); } // namespace vm
