Skip to content

Conversation

@csullivan
Copy link
Contributor

@csullivan csullivan commented Sep 8, 2021

This PR adds llvm unit tests that demonstrate the scheduling of conv2d and maxpool2d using a packed layout wherein spatial and channel dimensions are split into blocks. These tests can serve as a base off which to develop lowering for hexagon.

@csullivan
Copy link
Contributor Author

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR, thank you @csullivan ! Left some comments and nits

int(ceildiv(in_channel, in_factor)),
kernel,
kernel,
in_factor // in_second_factor,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in_first_factor

@Lunderberg
Copy link
Contributor

The changes look good to me. I like the hoisting of the shape definitions up into the conftest.py, to avoid redefinition across multiple files.

@csullivan
Copy link
Contributor Author

Thanks for the feedback @tmoreau89 @adstraw @Lunderberg, I've updated the commit. Please take a look when you have a chance.

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @csullivan the PR looks excellent, LGTM!

@tmoreau89 tmoreau89 merged commit b856d9e into apache:main Sep 14, 2021
@tmoreau89
Copy link
Contributor

Thank you @adstraw @Lunderberg @csullivan the PR has been merged

# Combination of padding required by conv2d operator and padding to evenly divisible
# number of blocks. Note that this padding should be inlined in the schedule so
# as to avoid input copying.
pad_h = (block_H - ((H + padding[1]) % block_H)) % block_H
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the second % block_H necessary?

ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
…8960)

* Add hexagon contrib tests for blocked conv2d and maxpool2d

* Restructure based on review comments
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
…8960)

* Add hexagon contrib tests for blocked conv2d and maxpool2d

* Restructure based on review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants