Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hexagon] Generalize builtin for Nd memory alloc with storage scope and add lowering for VTCM / Hexagon #10558

Merged
merged 44 commits into from
Mar 14, 2022
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
6bbe6cc
repurpose texture flatten for vtcm; TIR lowering correct
adstraw Mar 2, 2022
3cb0121
clean up remaining code in texture flatten pass
adstraw Mar 2, 2022
5365fab
add Alloc and FreeTexture, but failing to run over rpc
adstraw Mar 2, 2022
8044dc0
test passing with malloc in the device api
adstraw Mar 3, 2022
82f61be
cleanup
adstraw Mar 3, 2022
c1843ed
fails in very reliable way with memory corruption
adstraw Mar 4, 2022
4cef769
working with non-HexagonBuffer vtcm alloc
adstraw Mar 4, 2022
f13cd4c
cleanup
adstraw Mar 4, 2022
e9ef946
do not pass scope through mem_copy api
adstraw Mar 7, 2022
daac188
[Hexagon] Resolve breakage in test_hexagon/test_cache_read_write
Lunderberg Mar 7, 2022
5ca8970
use HexagonBuffer in Alloc and Free packed funcs
adstraw Mar 7, 2022
8cea1e1
Added comment indicating need for StackSizeChecker::MakeMemCopy.
Lunderberg Mar 7, 2022
05423ea
Merge branch 'hexagon_mem_copy_lower' into hexagon-alloc-nd-lower-vtcm
Lunderberg Mar 7, 2022
a96c062
add AllocVtcmWorkspace and FreeVtcmWorkspace
adstraw Mar 7, 2022
0ecd017
cleanup
adstraw Mar 8, 2022
2c1ee84
Updated unittests to run all contrib/test_hexagon at CI.
Lunderberg Mar 8, 2022
351b0af
create separate vtcm alloc lowering pass and transform
adstraw Mar 8, 2022
0f37782
reset texture_flatten.cc
adstraw Mar 8, 2022
6678e14
comments
adstraw Mar 8, 2022
1088c66
CI bump
Lunderberg Mar 8, 2022
7de3ae0
Fix lint formatting error.
Lunderberg Mar 9, 2022
794dbbf
Updated fix to remove StackSizeChecker entirely.
Lunderberg Mar 9, 2022
c21b254
Merge remote-tracking branch 'lunderberg/hexagon_mem_copy_lower' into…
adstraw Mar 9, 2022
7b06e7c
pass device and type to device api
adstraw Mar 9, 2022
bc372da
Bugfix, verify the precheck's allocations, not own.
Lunderberg Mar 9, 2022
4ff6471
Bugfix, pass context information to the precheck.
Lunderberg Mar 9, 2022
1c23651
pass order and shape to device api
adstraw Mar 9, 2022
7e43cd8
working
adstraw Mar 9, 2022
5132fd6
fix up types and arg passing
adstraw Mar 10, 2022
b28ff9c
pass scope to device api
adstraw Mar 10, 2022
3d28c59
common builtin for texture / vtcm
adstraw Mar 10, 2022
47268c5
add scope to freend api
adstraw Mar 10, 2022
40b0dd5
Merge remote-tracking branch 'lunderberg/hexagon_mem_copy_lower' into…
adstraw Mar 10, 2022
10ee3a5
Merge branch 'main' into hexagon-alloc-nd-lower-vtcm
adstraw Mar 10, 2022
1645238
format and lint
adstraw Mar 10, 2022
caed9f1
fixed missed format error
adstraw Mar 10, 2022
0f59317
restart ci
adstraw Mar 11, 2022
520f517
Merge branch 'main' into hexagon-alloc-nd-lower-vtcm
adstraw Mar 11, 2022
b7d8dd0
fix test random value issue + code review feedback
adstraw Mar 11, 2022
c3a3b30
fix test hang
adstraw Mar 11, 2022
53ce1ee
restructure lower vtcm pass per code review feedback (option a)
adstraw Mar 14, 2022
412857c
format error
adstraw Mar 14, 2022
38cd975
global.vtcm + tvm_stack_make_shape
adstraw Mar 14, 2022
484cc7b
Merge branch 'main' into hexagon-alloc-nd-lower-vtcm
adstraw Mar 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/tir/transforms/lower_vtcm_alloc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ class VtcmAllocator : public StmtExprMutator {
VtcmAllocator() {}

Stmt VisitStmt_(const AllocateNode* op) final {
Stmt body = this->VisitStmt(op->body);
std::string storage_scope = GetStorageScope(op->buffer_var);
Stmt stmt = StmtExprMutator::VisitStmt_(op);
op = stmt.as<AllocateNode>();

Stmt stmt = StmtExprMutator::VisitStmt_(op);
if (IsVtcmStorage(storage_scope)) {
Stmt body = this->VisitStmt(op->body);
adstraw marked this conversation as resolved.
Show resolved Hide resolved
Array<PrimExpr> args;
args.push_back(StringImm(storage_scope));
args.push_back(IntImm(DataType::Int(64), op->extents.size()));
Expand Down