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 2022/05/16 21:29:23 UTC

[GitHub] [tvm] mdwelsh commented on a diff in pull request #6563: [Rust] Improve NDArray, GraphRt, and Relay bindings

mdwelsh commented on code in PR #6563:
URL: https://github.com/apache/tvm/pull/6563#discussion_r874173627


##########
rust/tvm/src/runtime/graph_rt.rs:
##########
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use std::convert::TryInto;
+
+use crate::runtime::Function;
+use crate::{runtime::function::Result, runtime::ByteArray, Context, Module, NDArray};
+
+/// An instance of the C++ graph runtime.
+///
+/// An efficient and light weight runtime for static deep learning models.
+pub struct GraphRt {
+    /// The backing graph runtime module which exposes a set of packed functions
+    /// which can be invoked by a client.
+    ///
+    /// In the graph runtime module, it exposes create, load_params, set_input, get_output, and run.
+    module: Module,
+}
+
+impl GraphRt {
+    /// Create a graph runtime from the deprecated graph, lib, ctx triple.

Review Comment:
   This function has no unit tests.



-- 
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-unsubscribe@tvm.apache.org

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