This is an automated email from the ASF dual-hosted git repository.
tqchen 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 17d1a28900 [FIX][Adreno] Replace AllocBuffer with Bind in texture
alloc injection (#18881)
17d1a28900 is described below
commit 17d1a289004243ae3bf6cef88a456135229289cd
Author: Tianqi Chen <[email protected]>
AuthorDate: Fri Mar 6 08:08:16 2026 -0500
[FIX][Adreno] Replace AllocBuffer with Bind in texture alloc injection
(#18881)
## Summary
- Fix `inject_texture_alloc.cc` to replace `AllocBuffer` with just a
`Bind(nd_mem_alloc_with_scope)`, consistent with `LowerVtcmAlloc`
- Previously kept a redundant `AllocBuffer` alongside the `Bind` in a
`SeqStmt`
Follow-up to #18876.
---
src/s_tir/backend/adreno/inject_texture_alloc.cc | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/s_tir/backend/adreno/inject_texture_alloc.cc
b/src/s_tir/backend/adreno/inject_texture_alloc.cc
index dddb00c4fa..374ff80072 100644
--- a/src/s_tir/backend/adreno/inject_texture_alloc.cc
+++ b/src/s_tir/backend/adreno/inject_texture_alloc.cc
@@ -82,11 +82,8 @@ class TextureAllocInjector : public
arith::IRMutatorWithAnalyzer {
args.push_back(Call(DataType::Handle(), builtin::tvm_stack_make_shape(),
{texture.width, texture.height, texture.depth}));
args.push_back(IntImm(DataType::Int(64), channel_size));
- ffi::Array<Stmt> seq;
- seq.push_back(stmt);
- seq.push_back(Bind(op->buffer->data,
- Call(op->buffer->data.dtype(),
builtin::nd_mem_alloc_with_scope(), args)));
- stmt = SeqStmt(seq);
+ stmt = Bind(op->buffer->data,
+ Call(op->buffer->data.dtype(),
builtin::nd_mem_alloc_with_scope(), args));
}
return stmt;
}