xinyi61 opened a new issue #5234: tvm 0.7.dev1 AttributeError: module 'tvm' has 
no attribute 'placeholder'
URL: https://github.com/apache/incubator-tvm/issues/5234
 
 
   I am trying to build the TVM from source on my machine(CentOS Linux release 
7.7.1908),after compiled done, When I run the test cases below
   
   import tvm
   import time
   import timeit
   import numpy as np
   from matplotlib import pyplot as plt
   print(tvm.__version__)
   
   def vector_add(n):
       """TVM expression for vector add"""
       A = tvm.placeholder((n,), name='a') 
       B = tvm.placeholder((n,), name='b') 
       C = tvm.compute(A.shape, lambda i: A[i] + B[i], name='c')
       return A, B, C
   
   n = 20
   A, B, C = vector_add(n)
   
   type(A), type(C)
   
   it raise an error
   AttributeError                            Traceback (most recent call last)
   <ipython-input-1-cd3d94889f86> in <module>
        15 
        16 n = 20
   ---> 17 A, B, C = vector_add(n)
        18 
        19 type(A), type(C)
   
   <ipython-input-1-cd3d94889f86> in vector_add(n)
         9 def vector_add(n):
        10     """TVM expression for vector add"""
   ---> 11     A = tvm.placeholder((n,), name='a')
        12     B = tvm.placeholder((n,), name='b')
        13     C = tvm.compute(A.shape, lambda i: A[i] + B[i], name='c')
   
   my compile config:
   llvm version 9.0.0,all package except unit test
   tvm config
   set(USE_LLVM ON)
   set(USE_CUDA ON)
   
   and after compile and add follow script to my bashrc
   export TVM_HOME=/path/myown/tvm
   export PYTHONPATH=$TVM_HOME/python:$TVM_HOME/topi/python:${PYTHONPATH}
   
   i am newer to tvm, i also try to find some solutions from Baidu/Google but 
there is no gain

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to