yzh119 edited a comment on pull request #10207:
URL: https://github.com/apache/tvm/pull/10207#issuecomment-1034535980
Sure, below is the measured time of the kernel:
```python
@T.prim_func
def reduce(a: T.handle, b: T.handle, n: T.int32) -> None:
A = T.match_buffer(a, [1048576, n])
B = T.match_buffer(b, [1048576])
for i, j in T.grid(1048576, n):
with T.block("reduce"):
vi, vj = T.axis.remap("SR", [i, j])
with T.init():
B[vi] = 0.
B[vi] = B[vi] + A[vi, vj]
```
and change n between 2,4,8,16,32.
| n | 2 | 4 | 8 | 16
| 32 |
|----------|--------------------|-------------------|--------------------|--------------------|--------------------|
| shared-mem time(ms) | 0.836363387 | 0.902631863 | 1.214023657 |
1.249731274 | 1.175273217 |
| shuffle-down time(ms) | 0.80920489 | 0.9997110469999999 | 1.076497658 |
1.103504739 | 1.1167795269999998 |
there is some variance across multiple runs. Time evaluated with TVM's
native `time_evaluator`, takes the average time of 1000 runs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]