Commit 8443d88e authored by wangziyang's avatar wangziyang
Browse files

add load share offset from load indices

parent 74e57416
...@@ -103,7 +103,14 @@ class DSReadInjector : public StmtExprMutator { ...@@ -103,7 +103,14 @@ class DSReadInjector : public StmtExprMutator {
// For A_shared, use the actual shared memory base pointer // For A_shared, use the actual shared memory base pointer
PrimExpr m = make_const(DataType::Int(32), 32); PrimExpr m = make_const(DataType::Int(32), 32);
PrimExpr n = make_const(DataType::Int(32), 16); PrimExpr n = make_const(DataType::Int(32), 16);
PrimExpr offset = make_const(DataType::Int(32), 0);
PrimExpr offset;
// Extract the shared memory offset from the load indices
if (!load->indices.empty()) {
offset = load->indices[0];
} else {
offset = make_const(DataType::Int(32), 0);
}
// Use buffer data vars directly // Use buffer data vars directly
Array<PrimExpr> new_args = { Array<PrimExpr> new_args = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment