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/09/23 15:14:03 UTC

[GitHub] [incubator-tvm] qixiuai opened a new pull request #6539: Fix type code error in rust resnet example #6528

qixiuai opened a new pull request #6539:
URL: https://github.com/apache/incubator-tvm/pull/6539


   The error occured because the type of device_id in rust is u32, but in c++ is int. temporally convert the type of device_id to i32 to make this demo pass.
   
   Thanks for contributing to TVM!   Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @ them in the pull request thread.
   


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



[GitHub] [incubator-tvm] nhynes commented on a change in pull request #6539: Fix type code error in rust resnet example #6528

Posted by GitBox <gi...@apache.org>.
nhynes commented on a change in pull request #6539:
URL: https://github.com/apache/incubator-tvm/pull/6539#discussion_r493790146



##########
File path: rust/tvm/examples/resnet/src/main.rs
##########
@@ -76,7 +76,7 @@ fn main() {
         graph.into(),
         (&lib).into(),
         (&ctx.device_type).into(),
-        (&ctx.device_id).into(),
+        (&(ctx.device_id as i32)).into(),

Review comment:
       the real questions are
   a) why this requires a reference
   b) why `From<T> for DeviceId` isn't `impl`d for more types
   
   anyway, thanks for catching this!




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



[GitHub] [incubator-tvm] tqchen closed pull request #6539: Fix type code error in rust resnet example #6528

Posted by GitBox <gi...@apache.org>.
tqchen closed pull request #6539:
URL: https://github.com/apache/incubator-tvm/pull/6539


   


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