Uh oh!
There was an error while loading. Please reload this page.
[TOPI] improve inclusive_scan for thrust - #16652
Conversation
tqchen
commented
Feb 28, 2024
@tvm-bot rerun |
1 similar comment
yongwww
commented
Feb 28, 2024
@tvm-bot rerun |
| data, output_dtype, exclusive=True, return_reduction=return_reduction, binop=binop | ||
| ) | ||
| if _can_use_scan_thrust(binop): | ||
| return scan_thrust(data, output_dtype, return_reduction=return_reduction, binop=binop) |
There was a problem hiding this comment.
let's pass exclusive=True explicitly here
With this example: The 'cuda_gpu_kern_sum' stats report w/ this change Time (%) Total Time (ns) Instances Avg (ns) Med (ns) Min (ns) Max (ns) StdDev (ns) Name
w/o this change
The execution perf numbers I got on NVIDIA GeForce RTX 3070: R.cumsum(x, axis=1)
R.cumsum(x, axis=0)
|
The failed test |
e1931c6 to
db50782Compareyongwww
commented
Feb 29, 2024
@tvm-bot rerun |
Fix comments
db50782 to
aa0b202Compareyongwww
commented
Mar 1, 2024
@tvm-bot rerun |
1 similar comment
MasterJH5574
commented
Mar 2, 2024
@tvm-bot rerun |
The
topi.cuda.inclusive_scancurrently relies on performing anexclusive_scanfollowed by an add operation that adds the input data back in. To eliminate the overhead introduced by this extra addition, probably we should have an implementation specifically designed forinclusive_scan. As of now, the implementation ofinclusive_scanis limited toexclusive_scan_ir, developing aninclusive_scan_irwill be needed for performance in the future.In this pull request, we specifically address this efficiency for thrust by directly calling the inclusive function.
Co-authored-by: Wuwei Lin wuwei@apache.org