Lunderberg opened a new pull request, #16909: URL: https://github.com/apache/tvm/pull/16909
For most IR types, neither `std::hash` nor `std::equal_to` are provided, as it would be ambiguous whether comparisons should be performed with reference equality or structural equality. While this avoids ambiguity in the general case of nested structures, IR variables follow reference equality and are frequently used as lookup keys. This commit implements a specialization of `std::hash` and `std::equal_to` for `tvm::GlobalVar`, `tvm::tir::Var`, and `tvm::relax::Var`. This allows them to be used as lookup keys for `std::unordered_set` and `std::unordered_map` without explicitly specifying explicit `ObjectPtrHash` and `ObjectPtrEqual`. -- 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: commits-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org