[Relay] Add support for relay expressions as pad value for static pad (#7860)

* add support for expr as inputs to pad

* fix improper amount of args

* add dynamic padding test

* infer type better test

* add comments to type relations

* fix infer type layouts

* proper return shape

* proper shape infer type

* make the tests pass by setting the conditions

* make codegen reflect reality

* make ternary operations more pythonic

* proper infer layout

* fold explicit padding

* fix pattern matching in contrib

* revert tests for contrib now that pattern matching works

* revert import changes

* add newline
11 files changed
tree: 21eec40b93327edf573477eb02cb55e4c4fc0d8c
  1. .github/
  2. 3rdparty/
  3. apps/
  4. cmake/
  5. conda/
  6. docker/
  7. docs/
  8. golang/
  9. include/
  10. jvm/
  11. licenses/
  12. nnvm/
  13. python/
  14. rust/
  15. src/
  16. tests/
  17. tutorials/
  18. vta/
  19. web/
  20. .asf.yaml
  21. .clang-format
  22. .gitignore
  23. .gitmodules
  24. CMakeLists.txt
  25. conftest.py
  26. CONTRIBUTORS.md
  27. Jenkinsfile
  28. KEYS
  29. LICENSE
  30. Makefile
  31. NEWS.md
  32. NOTICE
  33. pyproject.toml
  34. pytest.ini
  35. README.md
  36. version.py
README.md

Open Deep Learning Compiler Stack

Documentation | Contributors | Community | Release Notes

Build Status WinMacBuild

Apache TVM is a compiler stack for deep learning systems. It is designed to close the gap between the productivity-focused deep learning frameworks, and the performance- and efficiency-focused hardware backends. TVM works with deep learning frameworks to provide end to end compilation to different backends.

License

© Contributors Licensed under an Apache-2.0 license.

Contribute to TVM

TVM adopts apache committer model, we aim to create an open source project that is maintained and owned by the community. Check out the Contributor Guide.

Acknowledgement

We learned a lot from the following projects when building TVM.

  • Halide: Part of TVM's TIR and arithmetic simplification module originates from Halide. We also learned and adapted some part of lowering pipeline from Halide.
  • Loopy: use of integer set analysis and its loop transformation primitives.
  • Theano: the design inspiration of symbolic scan operator for recurrence.