Skip to content

Commit da7b68d

Browse files
authored
[Python] Fix runtime tensor import (apache#18299)
This PR fixes a few places where the python import of runtime tensor is incorrect. The error wasn't revealed in the previous NDArray->Tensor rename PR since these imports are not at the top level.
1 parent 865d8f0 commit da7b68d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

python/tvm/exec/disco_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import tvm
2525
from tvm_ffi import get_global_func, register_global_func
2626
from tvm.runtime import Tensor, ShapeTuple, String
27-
from tvm.runtime.tensor import tensor
27+
from tvm.runtime import tensor
2828

2929

3030
@register_global_func("tests.disco.add_one", override=True)

python/tvm/testing/runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
def _args_to_device(args, device):
3333
import numpy as np
3434

35-
from tvm.runtime.tensor import Tensor, empty
35+
from tvm.runtime import Tensor, empty
3636

3737
uploaded_args = []
3838
for arg in args:
@@ -46,7 +46,7 @@ def _args_to_device(args, device):
4646

4747

4848
def _args_to_numpy(args):
49-
from tvm.runtime.tensor import Tensor
49+
from tvm.runtime import Tensor
5050

5151
downloaded_args = []
5252
for arg in args:

0 commit comments

Comments
 (0)