tqchen opened a new pull request, #19620:
URL: https://github.com/apache/tvm/pull/19620

   ## Summary
   
   `tvm::runtime::regex_match` was a thin C++ wrapper that bounced through a
   global `ffi::Function` back into Python's `re.match`. It was introduced
   solely to avoid pulling `<regex>` into TVM (libstdc++ dual-ABI conflict with
   pre-cxx11 pytorch wheels). The only C++ caller is the DNNL JSON runtime, 
where
   every pattern reduces to substring containment — `re.match` anchors at the
   start only, so `.*X.*` is equivalent to `s.find(X) != npos`.
   
   - Remove `src/runtime/regex.{h,cc}` and the Python `tvm.runtime.regex_match`
     global registration.
   - Add file-local `contains` / `contains_any` helpers in 
`dnnl_json_runtime.cc`
     and inline `std::string::find` at the 15 call sites.
   - Drop the dead `regex.h` include from 
`src/relax/transform/update_param_struct_info.cc`.
   
   No CMakeLists.txt change needed — `src/runtime/*.cc` is picked up by glob.
   
   `USE_DNNL` is OFF in the ci_gpu container, so DNNL-specific runtime tests
   are not exercised locally. The DNNL translation unit compiles cleanly with
   the inlined helpers, and the full TVM build (636 targets) passes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to