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/06/10 19:08:28 UTC

[GitHub] [incubator-tvm] jroesch commented on a change in pull request #5764: [WIP] `tvm` crate stage 3 of Rust refactor

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



##########
File path: rust/tvm/src/ir/array.rs
##########
@@ -0,0 +1,74 @@
+use std::convert::TryFrom;
+use std::marker::PhantomData;
+
+use crate::runtime::object::{ObjectRef, ToObjectRef};
+
+use tvm_rt::external;
+use tvm_rt::RetValue;
+
+use anyhow::Result;
+
+#[derive(Clone)]
+pub struct Array<T: ToObjectRef> {
+    object: ObjectRef,
+    _data: PhantomData<T>,
+}
+
+external! {
+    #[name("node.ArrayGetItem")]
+    fn array_get_item(array: ObjectRef, index: isize) -> ObjectRef;
+}
+
+impl<T: ToObjectRef> Array<T> {
+    pub fn from_vec(data: Vec<T>) -> Result<Array<T>> {
+        unimplemented!()

Review comment:
       I was updating the code from the old Array container to the new one, so I just disabled the implementation while I try to port to new macros.




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