This is an automated email from the ASF dual-hosted git repository.
masahi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new e0aac94 [Hexagon] Fix VTCM allocation (#8954)
e0aac94 is described below
commit e0aac9402bed297feb3467232a7d4c89e0752823
Author: Krzysztof Parzyszek <[email protected]>
AuthorDate: Wed Sep 8 02:50:58 2021 -0500
[Hexagon] Fix VTCM allocation (#8954)
Check if a buffer is in the `vtcm_buffers` list, before it's removed
from it.
---
python/tvm/contrib/hexagon.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/python/tvm/contrib/hexagon.py b/python/tvm/contrib/hexagon.py
index 6364ef7..fe25616 100644
--- a/python/tvm/contrib/hexagon.py
+++ b/python/tvm/contrib/hexagon.py
@@ -194,9 +194,10 @@ def lower_vtcm_(get_alloc, get_free, def_align, func, mod,
ctx): # pylint: disa
if isinstance(stmt, tvm.tir.Allocate):
var = stmt.buffer_var
scope = var.type_annotation.storage_scope
+ is_vtcm = var in vtcm_buffers
if scope == "local.vtcm":
vtcm_buffers.pop()
- if var in vtcm_buffers:
+ if is_vtcm:
is_null = tvm.tir.call_intrin("bool",
tvm.ir.Op.get("tir.isnullptr"), var)
throw_error = tvm.tir.call_intrin(
"int32", tvm.ir.Op.get("tir.tvm_throw_last_error")