You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by jr...@apache.org on 2021/03/31 04:52:16 UTC
[tvm] 01/23: Rewrite the Rust Module API and change some imports
causing crashes.
This is an automated email from the ASF dual-hosted git repository.
jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git
commit 69675d46ea9161234cbfaeb9c8c65897a0eb99b0
Author: Jared Roesch <jr...@octoml.ai>
AuthorDate: Wed Feb 17 21:01:22 2021 -0800
Rewrite the Rust Module API and change some imports causing crashes.
This commit also updates the docs to remove outdated information.
---
rust/tvm/src/compiler/graph_rt.rs | 1 +
tests/python/topi/python/test_topi_sparse.py | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/rust/tvm/src/compiler/graph_rt.rs b/rust/tvm/src/compiler/graph_rt.rs
index 6b58733..61409ba 100644
--- a/rust/tvm/src/compiler/graph_rt.rs
+++ b/rust/tvm/src/compiler/graph_rt.rs
@@ -26,6 +26,7 @@ use thiserror::Error;
use crate::ir::IRModule;
use crate::python;
+use crate::runtime::IsObjectRef;
use crate::runtime::{map::Map, Function, Module as RtModule, NDArray, String};
#[derive(Error, Debug)]
diff --git a/tests/python/topi/python/test_topi_sparse.py b/tests/python/topi/python/test_topi_sparse.py
index 500384b..6db1b2a 100644
--- a/tests/python/topi/python/test_topi_sparse.py
+++ b/tests/python/topi/python/test_topi_sparse.py
@@ -25,7 +25,6 @@ from tvm.topi.utils import get_const_tuple
import tvm.contrib.sparse as tvmsp
from collections import namedtuple
import time
-import scipy.sparse as sp
import tvm.testing
_sparse_dense_implement = {
@@ -248,6 +247,8 @@ def test_dense():
def test_sparse_dense_csr():
+ import scipy.sparse as sp
+
M, N, K, density = 1, 17, 47, 0.2
X_np = np.random.randn(M, K).astype("float32")
W_sp_np = sp.random(N, K, density=density, format="csr", dtype="float32")