Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
af54414
[TIR] Output DeclBuffer in SplitHostDevice
Lunderberg May 5, 2023
1c59bc9
Updated thread sync test to account for DeclBuffer
Lunderberg May 12, 2023
2538ac8
Updated LowerWarp unit tests to find Allocate in PrimFunc
Lunderberg May 12, 2023
f49ae70
Merge branch 'declbuffer_output_from_split_host_device_pr_15493' into…
Lunderberg Aug 15, 2023
ae08a36
[TIR] Output DeclBuffer in LowerThreadAllreduce
Lunderberg Jun 7, 2023
0321159
Update LowerThreadAllreduce tests to expect DeclBuffer
Lunderberg Jul 5, 2023
0cf93cf
[TIR] Output DeclBuffer in FlattenBuffer
Lunderberg May 5, 2023
84dfa8d
[TIR] Output DeclBuffer nodes during StorageFlatten
Lunderberg May 9, 2023
82862ca
Updated tests for FlattenBuffer and StorageFlatten
Lunderberg May 12, 2023
75d8de9
Updated loop partition tests for DeclBuffer
Lunderberg May 9, 2023
8871d8f
unit tests, inject virtual thread
Lunderberg Jul 5, 2023
2b11a59
Update StorageRewrite tests to expect DeclBuffer
Lunderberg May 12, 2023
4641f1b
unit tests, narrow datatype
Lunderberg Jul 5, 2023
6c6ce57
[TIR] Output DeclBuffer from CrossThreadReduction
Lunderberg May 12, 2023
3df4379
[TIR] Updated BindParams to output DeclBuffer
Lunderberg May 8, 2023
acfc2a7
Update test_lower_build.py tests for new decl_buffer behavior
Lunderberg May 8, 2023
786d207
Updated coproc sync tests to skip past DeclBuffer
Lunderberg May 12, 2023
5f5f4bd
[TIR] Output DeclBuffer in ir_builder
Lunderberg May 11, 2023
2f733c5
Updated ir_builder unit test to expect DeclBuffer
Lunderberg May 12, 2023
032834e
unit tests, te schedule
Lunderberg Jul 5, 2023
29f7416
unit tests, te hybrid script
Lunderberg Jul 5, 2023
61423c4
unit tests, te build lower
Lunderberg Jul 5, 2023
c96bef1
Updated test case for TE lower
Lunderberg May 12, 2023
388015e
unit tests, lift attr scope
Lunderberg Jul 5, 2023
b463202
[TIR] Require Buffer definition before use
Lunderberg Apr 17, 2023
a02ddc4
Remove test of TIR schedule primitives with implicit buffers
Lunderberg Jul 5, 2023
8be81ad
[EthosU] Update lowering passes to track tir.Buffer
Lunderberg Jul 10, 2023
ebd1038
[TIR] Improved DeclBuffer handling in StorageRewrite
Lunderberg Jul 11, 2023
b4d5188
[EthosU] Update lowering passes to handle DeclBuffer
Lunderberg Jul 11, 2023
6b4a4e0
Update EthosU unit tests to expect DeclBuffer nodes
Lunderberg Jul 11, 2023
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
22 changes: 11 additions & 11 deletions python/tvm/relay/backend/contrib/ethosu/tir/binary_elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_binary_elementwise_params(
-------
SerialBinaryElementwise
The parameters needed to construct a binary elementwise operator.
output_pointer : tvm.tir.Var
output_buffer : tvm.tir.Buffer
The output pointer of the binary elementwise operation.
replace_pointer : tvm.tir.Var
The output pointer of the DMA write operation, which is to replace
Expand All @@ -56,17 +56,17 @@ def get_binary_elementwise_params(
_, _, _, _, _, inner = get_outer_loops(body, "NHWC")
# loads = [input, input, LUT, LUT]
loads = get_loads(inner)
input_pointer = loads[0].buffer.data
input_pointer1 = loads[1].buffer.data
input_buffer = loads[0].buffer
input_buffer1 = loads[1].buffer

if reversed_operands:
input_pointer, input_pointer1 = input_pointer1, input_pointer
output_pointer = inner.buffer.data
input_buffer, input_buffer1 = input_buffer1, input_buffer
output_buffer = inner.buffer
# Get feature map info
serial_ifm, _ = get_ifm_params(input_pointer, producers_consumers, stmt)
serial_ifm2, _ = get_ifm_params(input_pointer1, producers_consumers, stmt)
serial_ofm, serial_block_config, replace_pointer, is_allocator = get_ofm_params(
output_pointer, producers_consumers, stmt
serial_ifm, _ = get_ifm_params(input_buffer, producers_consumers, stmt)
serial_ifm2, _ = get_ifm_params(input_buffer1, producers_consumers, stmt)
serial_ofm, serial_block_config, replace_buffer, is_allocator = get_ofm_params(
output_buffer, producers_consumers, stmt
)
# Get activation info
serial_activation = SerialActivation(
Expand All @@ -87,7 +87,7 @@ def get_binary_elementwise_params(
block_config=serial_block_config,
rescale_config=rescale_config,
),
output_pointer,
replace_pointer,
output_buffer,
replace_buffer,
is_allocator,
)
18 changes: 9 additions & 9 deletions python/tvm/relay/backend/contrib/ethosu/tir/convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def get_conv2d_params(stmt, producers_consumers):
-------
Serial2DConvolution
The parameters needed to construct a 2D convolution.
output_pointer : tvm.tir.Var
output_buffer : tvm.tir.Buffer
The output pointer of the convolution operation.
replace_pointer : tvm.tir.Var
replace_buffer : tvm.tir.Buffer
The output pointer of the DMA write operation, which is to replace
the convolution output pointer.
is_allocator : bool
Expand All @@ -60,12 +60,12 @@ def get_conv2d_params(stmt, producers_consumers):
loads = get_loads(rc.body)
# stores = [output]
stores = get_stores(rc.body)
input_pointer = loads[1].buffer.data
output_pointer = stores[0].buffer.data
input_buffer = loads[1].buffer
output_buffer = stores[0].buffer
# Get feature map info
serial_ifm, serial_padding = get_ifm_params(input_pointer, producers_consumers, stmt)
serial_ofm, serial_block_config, replace_pointer, is_allocator = get_ofm_params(
output_pointer, producers_consumers, stmt
serial_ifm, serial_padding = get_ifm_params(input_buffer, producers_consumers, stmt)
serial_ofm, serial_block_config, replace_buffer, is_allocator = get_ofm_params(
output_buffer, producers_consumers, stmt
)
# Get kernel info
serial_kernel = SerialKernel(
Expand Down Expand Up @@ -157,7 +157,7 @@ def get_conv2d_params(stmt, producers_consumers):
upscale=attrs["upscale"],
block_config=serial_block_config,
),
output_pointer,
replace_pointer,
output_buffer,
replace_buffer,
is_allocator,
)
24 changes: 12 additions & 12 deletions python/tvm/relay/backend/contrib/ethosu/tir/depthwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ def get_depthwise_conv2d_params(
-------
Serial2DDepthwise
The parameters needed to construct a 2D depthwise.
output_pointer : tvm.tir.Var
The output pointer of the convolution operation.
replace_pointer : tvm.tir.Var
The output pointer of the DMA write operation, which is to replace
the convolution output pointer.
output_buffer : tvm.tir.Buffer
The output buffer of the convolution operation.
replace_buffer : tvm.tir.Buffer
The output buffer of the DMA write operation, which is to replace
the convolution output buffer.
is_allocator : bool
Whether this operator allocates its output.

Expand All @@ -64,12 +64,12 @@ def get_depthwise_conv2d_params(
loads = get_loads(rw.body)
# stores = [output]
stores = get_stores(rw.body)
input_pointer = loads[1].buffer.data
output_pointer = stores[0].buffer.data
input_buffer = loads[1].buffer
output_buffer = stores[0].buffer
# Get feature map info
serial_ifm, serial_padding = get_ifm_params(input_pointer, producers_consumers, stmt)
serial_ofm, serial_block_config, replace_pointer, is_allocator = get_ofm_params(
output_pointer, producers_consumers, stmt
serial_ifm, serial_padding = get_ifm_params(input_buffer, producers_consumers, stmt)
serial_ofm, serial_block_config, replace_buffer, is_allocator = get_ofm_params(
output_buffer, producers_consumers, stmt
)
# Get kernel info
serial_kernel = SerialKernel(
Expand Down Expand Up @@ -113,7 +113,7 @@ def get_depthwise_conv2d_params(
upscale="NONE",
block_config=serial_block_config,
),
output_pointer,
replace_pointer,
output_buffer,
replace_buffer,
is_allocator,
)
Loading