[TensorIR][PASS][M1c] PlanUpdateBufferAllocationLocation#7873
[TensorIR][PASS][M1c] PlanUpdateBufferAllocationLocation#7873junrushao merged 1 commit intoapache:mainfrom
Conversation
|
Shall we find a shorter name this this pass 😆 |
junrushao
left a comment
There was a problem hiding this comment.
Shall we find a short name for this pass? What about RealizeBufferAlloc?
beab57d to
b93f63f
Compare
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
| for i_0 in range(0, 16): | ||
| with tir.block([]): | ||
| tir.reads([A[i_0, 0:16]]) | ||
| tir.writes([C[i_0, 0:16]]) | ||
| B = tir.alloc_buffer([16, 16]) |
There was a problem hiding this comment.
Does this test case means that the buffer defined outside this block(the original element_func) will be transformed to a buffer inside the block?
What if the for i_0 in range(0, 16) is a axis with parallel, this will turns a thread common buffer to a thread local buffer?
There was a problem hiding this comment.
@jcf94 i believe your understanding is correct in this case
|
The current naming is fine given it is a pass only used internally. Realize may also may not best describe it, as this pass |
junrushao
left a comment
There was a problem hiding this comment.
Just chatted with TQ but either of us found no better name... :-(
So let's just stick to PlanUpdateBufferAllocationLocation then...
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
This PR is part of the TensorIR upstreaming effort (#7527) as one of the M1c stages, introducing the pass PlanUpdateBufferAllocationLocation.
This Pass will Locate the buffer allocation to the exact position (usually is the lca of buffer access) and inject opaque block
with alloc_buffers to annotate the buffer allocation site.
cc @tqchen @comaniac @jroesch @junrushao1994