Skip to content

Commit

Permalink
update parse error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed May 17, 2022
1 parent ad9b053 commit b35bff9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/tvm/script/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,15 +631,18 @@ def transform_Assign(self, node):
return tvm.tir.LetStmt(var, value, body, span=tvm_span_from_synr(node.span))

self.report_error(
"""Assignments should be either
"""Assignments should be one of:
1. A "special statement" with return value
1.1 Buffer = T.match_buffer()/T.buffer_decl()
1.2 Var = T.var()
1.3 Var = T.env_thread()
2. A store into a buffer: Buffer[PrimExpr, PrimExpr, ..., PrimExpr] = PrimExpr
3. A store into a variable: Var[PrimExpr] = PrimExpr
4. A with scope handler with concise scoping and var def
4.1 var = T.allocate()""",
4.1 var = T.allocate()
5. The right-hand side being a call to a pure python function, consuming and
producing TVMScript values.
x, y = f(...)""",
node.span,
)

Expand Down

0 comments on commit b35bff9

Please sign in to comment.