Uh oh!
There was an error while loading. Please reload this page.
[Topi] Tensorcore support for Conv3D - #5284
Conversation
jwfromm
commented
Apr 8, 2020
@Shawn-Inspur, @Laurawly could you take a look at this PR? |
tqchen
commented
Apr 8, 2020
also cc @icemelon9 since it is related to stragey |
jwfromm
commented
Apr 9, 2020
Anyone know what the deal with the CI failure is? Seems to work fine on my local branch and has nothing to do with this PR. |
tqchen
commented
Apr 9, 2020
The sphinx error is a known flaky case that we should look into, please push to retrigger |
FrozenGene
commented
Apr 9, 2020
@yangjunpro@minminsun Please also have a look, because you have done tensorcore support ever. |
Uh oh!
There was an error while loading. Please reload this page.
icemelon
left a comment
There was a problem hiding this comment.
LGTM. just some minor comments
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
yangjunpro
left a comment
There was a problem hiding this comment.
Nice work.
Just two small cents.
The schedule looks a little bit complicated.
Have your considered enriching the Auto TensorCore codegen pass to automate the TensorCore schedule generation process?
The previous work of Auto TensorCore codegen only covers GEMM and it does require additional work to add conv support. However with the addition of conv support into Auto TensorCore codegen pass, it may make the convolution tensorcore optimization more generic.
Uh oh!
There was an error while loading. Please reload this page.
jwfromm
commented
Apr 12, 2020
@yangjunpro, funnily enough I asked nearly the same question to the authors of the conv2d tensorcore schedule. You can read their answer here. The quick take is that it does not support conv (like you mentioned) but more importantly that it causes significant performance regression compared to a bespoke approach like this one. |
tqchen
commented
Apr 13, 2020
Thanks @jwfromm@Laurawly @Shawn-Inspur @yangjunpro @icemelon9 ! |
* one weird trick. * Added schedule knob for different workloads. * Initial conv3d tensorcore working. * Added conv3d tensorcore strategy. * Added layout conversion to tensorcore friendly format for conv2d and conv3d. * Add target name check. * Fixed bad names and depthwise check. * Removed duplicated attribute assignment.
* one weird trick. * Added schedule knob for different workloads. * Initial conv3d tensorcore working. * Added conv3d tensorcore strategy. * Added layout conversion to tensorcore friendly format for conv2d and conv3d. * Add target name check. * Fixed bad names and depthwise check. * Removed duplicated attribute assignment.
* one weird trick. * Added schedule knob for different workloads. * Initial conv3d tensorcore working. * Added conv3d tensorcore strategy. * Added layout conversion to tensorcore friendly format for conv2d and conv3d. * Add target name check. * Fixed bad names and depthwise check. * Removed duplicated attribute assignment.
This PR is a pretty direct port of the conv2d tensorcore schedules introduced in PR #5099 to conv3d. In my early testing I've found this new schedule to be up to 10X faster than the default conv3d schedule. I also snuck one little adjustment into the conv3d winograd schedule that helps for smaller workloads. Given that tensorcore support is currently only for
NHWCandNDHWClayouts, I've also added support for converting to these layouts using theConvertLayoutpass.