masahi commented on PR #13050:
URL: https://github.com/apache/tvm/pull/13050#issuecomment-1278629331

   >  currently I can see the only option of module equality functions defined 
on the c++ side, do you think we can also allow easier customization of the 
hash and equal function via providing FFI functions or by overridding the class 
from python side (i.e., providing a PyModuleEquality class)?
   
   This can be considered in future, but I don't expect that people would want 
to add a custom `ModuleEquality` often. So for now, `ModuleEquality` is not 
exposed to python, this lets me spare from boilerplates and make 
`ModuleEquality` creation as simple as
   ```
   std::unique_ptr<ModuleEquality> ModuleEquality::Create(const std::string& 
mod_eq_name) {
     if (mod_eq_name == "structural") {
       return std::make_unique<ModuleEqualityStructural>();
     }
     LOG(FATAL) << "Unknown module equality " << mod_eq_name;
     return nullptr;
   }
   ```


-- 
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]

Reply via email to