You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/11/05 03:08:54 UTC

[GitHub] [incubator-tvm] jroesch commented on a change in pull request #6741: [Rust][IRModule] Flesh out IRModule methods

jroesch commented on a change in pull request #6741:
URL: https://github.com/apache/incubator-tvm/pull/6741#discussion_r517766695



##########
File path: rust/tvm-macros/src/object.rs
##########
@@ -185,5 +187,26 @@ pub fn macro_impl(input: proc_macro::TokenStream) -> TokenStream {
 
     expanded.extend(base_tokens);
 
+    if derive {
+        let derives = quote! {
+            impl std::hash::Hash for #ref_id {
+                fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+                    self.0.hash(state)

Review comment:
       No we generate a wrapper new type over the ObjectPtr<T> which contains 1 field always. ObjectPtr is currently dispatching to TVM's C++ hashing so we have cross language consistency. 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org