AttributeError: module 'tvm' has no attribute 'context'

I have build tvm from the source. Currently, on branch: main 40d5193a9 [origin/main] I am getting the below error while setting the context:

>>>import tvm
>>>ctx = tvm.context("cuda",0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'tvm' has no attribute 'context'
1 Like

What is your tvm version?

I am using: “0.8.dev0”

It has been renamed to tvm.device.

2 Likes

Many thanks @comaniac. It worked. Also, I had to fix graph_runtime error mentioned here AttributeError: module ‘tvm.contrib.graph_runtime’ has no attribute 'GraphModule - Questions - Apache TVM Discuss.

Please let me know if I can refer to these changes listed somewhere?

Thanks.

Those are the changes in the current dev branch (0.8.dev) so there’s no list for them yet. They should be in the official release note in 0.8.

Makes sense. Thanks again.