Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Op] Do not override specified layout in pooling #9235

Closed
wants to merge 64 commits into from

Conversation

ccjoechou
Copy link
Contributor

…rt_op_layout.py

Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.

* add part of operators

* remove part of operators

* add lookup

* add test

* Update paddlepaddle.py

* modify error message for SAME padding

* Remove some function and old version operator

* Remove some function and old version operator

* Remove some function and old version operator

* Remove some function and old version operator

* add dot test

* modify doc

* remove unreviewed code

* Update paddlepaddle.py

* Update test_forward.py

* Update paddlepaddle.py

* Update paddlepaddle.py

* Update test_forward.py

* Update test_forward.py

* add more cases for tests

* add more cases for tests

* remove annotation

* reduce test case sizes

* fix bug for paddlepaddle frontend
@ccjoechou ccjoechou changed the title [bug] pooling convert layout bug in pooling.cc and in test_pass_conve… [bug] pooling convert layout bug in pooling.cc and in test_pass_conve… (see also issue #8848) Oct 9, 2021
junrushao and others added 10 commits October 9, 2021 13:30
* Documentation Refactor - Stage 1

RFC: https://github.com/apache/tvm-rfcs/blob/main/rfcs/0027-formalize-documentation-organization.md
Tracking Issue: apache#8987

Stage 1 of the documentation refactor reorganizes the docs structure,
moving files (without content changes) and adding new scaffolding to
generate the proper document tree.

It does not address naming, style, content, links, or other existing
content in documents that were moved. State 2 will address fixing these
issues with existing content.

Major changes include but are not limited to:

* Dividing the existing tutorials into two sections:
  * Tutorials
  * How Tos
* Moving all of the existing tutorials out of the `/tutorial`
  directory and into the more general `/gallery` directory.
* Breaking up how-tos into individual sections for more
  flexibility and more consistent rendering.
* Moving content into new classifications:
  * `/docs/arch` for architecture guides
  * `/docs/reference` for API guides and other reference material
  * `/docs/topic` for topic specific guides such as microTVM and VTA
  * Restructuring `/docs/dev`
* Adding a table of contents to the doc index
* Adding instructions on how to install using third-party tlcpack

* Documentation Refactor - Stage 2

RFC: https://github.com/apache/tvm-rfcs/blob/main/rfcs/0027-formalize-documentation-organization.md
Tracking Issue: apache#8987

Stage 2 of the documentation refactor fixes naming and links
in the documentation to be consistent with the overall structure.

Major changes include:

* an update to how to contribute to docs.
* several updated index pages with title changes to match
  the organization style and bring consistency to the sections
* expanded descriptions of some page collections
* fixed links

* Documentation Refactor - Stage 3

RFC: https://github.com/apache/tvm-rfcs/blob/main/rfcs/0027-formalize-documentation-organization.md
Tracking Issue: apache#8987

Stage 3 of the documentation refactor adjusts CI for the new structure.
The CI build script takes into account the new gallery format. It
also prevents deleting existing documents, and takes advantage of the
`_staging` and `_build` directories to clean out previous builds.
When I didn't have `:latest` available I saw that my image wasn't being
re-used between runs.
Fix install from source link(pointed to matplotlib).
Updated some wording.
Move description of tlcpack to just a link so it can be kept from tlcpack side.
* Initial Implementation of TIRToRuntime Target hook

This is the initial implementation which wires in a test case for TIRToRuntime, in order to get this working I re-used `CodegenCHost` as it implements all of the `Op`s required from the lowered `PrimFunc`.

Currently, the `IRModule` is non-unified but in future work it should definitely do so, I wanted to implement the basics here to get the infra in place.

* Fix heterogeneous compute with multiple kDLCPU targets

* Remove rogue te_compiler.h include
* adds importer code

 * enables `test_qlinearmatmul_2D` unit test
* Arm(R) Ethos(TM)-U NPU Depthwise2d operator support

This commit adds support for Depthwise2d primitive operator throughout
the TVM stack including Relay legalization pass, operator definition,
TE, TIR passes and translation into the command stream.

Change-Id: If82b85f5d3b23cd214fe38babd724451bf95ef5b

* Change depthwise2d to depthwise_conv2d

And respond to other review comments.

Change-Id: I58a9f28723750970d386b4d0ba62fa399c5c6181

* Make a line shorter and add a comment

Change-Id: Idf4c078bf65e7ed31fe82a92bf334295a82b6ead

* Change the order of imports

Change-Id: Ic6c77af30a5b9cb68dcc0c173b95490965359481

* Whitespace change

Change-Id: I7318bd8cfa5985b33fc7d020cc19057cc9498197
* support gather op dynamic input

* fix shape func and add test

* remove constness check

* fix shape func output rank

* restore check

Co-authored-by: masa <masa@pop-os.localdomain>
…NCHW etc properly) (apache#9245)

* prohibit propagating through packed to unpacked layout

* add test
@vinx13
Copy link
Member

vinx13 commented Oct 11, 2021

There are some failing test cases on CI that relate to this change

@ccjoechou
Copy link
Contributor Author

@comaniac, @vinx13, @masahi: I have pushed changes based on feedback. Latest changes are now utilizing a new out_layout field of pooling op (similar to what conv op has) so that, when out_layout is specified by user for pooling, pooling op will use and stick to the specified out_layout format.
Otherwise, the original infer layout will be used as originally.
4 new test cases have been added to the test_pass_convert_op_layout.py test suite to illustrate how to specify layout in pooling.

@comaniac
Copy link
Contributor

Ah please rebase against to the latest commit. This PR shouldn't have 9k changes...

@ccjoechou
Copy link
Contributor Author

ccjoechou commented Oct 19, 2021 via email

@comaniac
Copy link
Contributor

Please use rebase instead of merge. We need to see the correct changes of this PR, and it cannot include the commits from other PRs.

@ccjoechou
Copy link
Contributor Author

ccjoechou commented Oct 19, 2021 via email

@ccjoechou
Copy link
Contributor Author

ccjoechou commented Oct 19, 2021 via email

@vinx13
Copy link
Member

vinx13 commented Oct 19, 2021

You can force push to current branch, so that you don't need to create new PR. Usually you will use git pull --rebase

@ccjoechou
Copy link
Contributor Author

ccjoechou commented Oct 19, 2021 via email

@vinx13
Copy link
Member

vinx13 commented Oct 19, 2021

since you have already used merge, you need to run git rebase main in working branch (you need to make sure main is up to date first)

AndrewZhaoLuo and others added 4 commits October 19, 2021 12:43
* flags to turn off and on

* turn fast math on always

* llvm more opts

* move to default codegen opt

* TODO

* add fast math options to llvm target

* move to using new target attributes

* llvm fast math target opt code

* add -O flags

* fix todo lint

* support llvm 4.0, 5.0

* use same opt level as target machine

* revert TargetOptions

* fix thing

* prevent regression in llvm

* togglable opt-levels

Co-authored-by: Andrew Zhao Luo <andrewzhaoluo@system76-pc.localdomain>
…e#9292)

Added a hooks to the VM execution loop to record runtime of certain
instructions with significant runtimes. Now the profiling report will
include data allocation and transfer times.
Updates links to use references instead of direct links, fixing
broken links and making all internal docs links more durable to
refactoring
@ccjoechou
Copy link
Contributor Author

ccjoechou commented Oct 19, 2021 via email

@vinx13
Copy link
Member

vinx13 commented Oct 19, 2021

git checkout main
git pull upstream main # this will update main branch locally
git checkout working
git rebase main

creating a new PR is ok but you still need to make sure you branch is clean (via cherry-pick or rebase)

@ccjoechou
Copy link
Contributor Author

ccjoechou commented Oct 19, 2021 via email

@ccjoechou
Copy link
Contributor Author

ccjoechou commented Oct 19, 2021 via email

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.