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

Introduce centralised name transformation functions #9088

Merged
merged 3 commits into from
Sep 30, 2021

Conversation

Mousius
Copy link
Member

@Mousius Mousius commented Sep 23, 2021

To address some of the concerns raised in #8280 and #8720 I've put together a series of functions to combine together names to re-use between these areas. These are meant to be a starting point to fix up the name generation to use the TVM C conventions and port the interface API header to C++.

These functions will also be used for constructing the names in the C Device API (apache/tvm-rfcs#31)

cc @Raghav-Chakravarthy @areusch

To address some of the concerns raised in apache#8280 and apache#8720 I've put together a series of functions to combine together names to re-use between these areas. These are meant to be a starting point to fix up the name generation to use the TVM C conventions and port the interface API header to C++.

These functions will also be used for constructing the names in the C Device API (apache/tvm-rfcs#31).
Mousius added a commit to Mousius/tvm that referenced this pull request Sep 24, 2021
Using the new name transformations added in apache#9088, the C interface API is now generated in C++ rather than in Python.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes apache#8792
Mousius added a commit to Mousius/tvm that referenced this pull request Sep 24, 2021
Using the new name transformations added in apache#9088, the C interface API is now generated in C++ rather than in Python.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes apache#8792
Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

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

thanks @Mousius, couple comments and just wondering if we should update the various mangle functions to use these as well?

src/relay/backend/name_transforms.cc Show resolved Hide resolved
src/relay/backend/name_transforms.h Show resolved Hide resolved
tests/python/relay/test_name_transforms.py Outdated Show resolved Hide resolved
tests/python/relay/test_name_transforms.py Show resolved Hide resolved
python/tvm/relay/backend/name_transforms.py Outdated Show resolved Hide resolved
This patch aims to sanitize uses of sanitise to the form of sanitize to be consistent with the overall codebases use of American English.
@Mousius
Copy link
Member Author

Mousius commented Sep 28, 2021

@areusch I've made the requested changes barring the discussion around how to name the functions. Could you please take another look? 😸

@areusch
Copy link
Contributor

areusch commented Sep 30, 2021

@Mousius my only question is basically if we'll also update runtime::get_name_mangled as well? otherwise this LGTM.

@Mousius
Copy link
Member Author

Mousius commented Sep 30, 2021

@areusch yep, that'll come after #9106 so I can go round all in one go 😸

Copy link
Contributor

@manupak manupak left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

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

thanks @Mousius makes sense to me!

@areusch areusch merged commit 7974e30 into apache:main Sep 30, 2021
@Mousius Mousius deleted the centralised-name-mangling branch September 30, 2021 18:09
Mousius added a commit to Mousius/tvm that referenced this pull request Sep 30, 2021
Using the new name transformations added in apache#9088, the C interface API is now generated in C++ rather than in Python. This is intended to be a no-op for the actual users of this change and thus I've undone some of my overzealous sanitizing to match that expectation.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes apache#8792
AndrewZhaoLuo added a commit to AndrewZhaoLuo/tvm that referenced this pull request Sep 30, 2021
* main: (80 commits)
  Introduce centralised name transformation functions (apache#9088)
  [OpenCL] Add vectorization to cuda conv2d_nhwc schedule (apache#8636)
  [6/6] Arm(R) Ethos(TM)-U NPU codegen integration with `tvmc` (apache#8854)
  [microTVM] Add wrapper for creating project using a MLF (apache#9090)
  Fix typo (apache#9156)
  [Hotfix][Testing] Wait for RPCServer to be established (apache#9150)
  Update find cublas so it search default path if needed. (apache#9149)
  [TIR][LowerMatchBuffer] Fix lowering strides when source region has higher dimension than the buffer (apache#9145)
  Fix flaky NMS test by making sure scores are unique (apache#9140)
  [Relay] Merge analysis/context_analysis.cc and transforms/device_annotation.cc (apache#9038)
  [LLVM] Make changes needed for opaque pointers (apache#9138)
  Arm(R) Ethos(TM)-U NPU codegen integration (apache#8849)
  [CI] Split Integration tests out of first phase of pipeline (apache#9128)
  [Meta Schedule][M3b] Runner (apache#9111)
  Fix Google Mock differences between Ubuntu 18.04 and 16.04 (apache#9141)
  [TIR] add loop partition hint pragma (apache#9121)
  fix things (apache#9146)
  [Meta Schedule][M3a] SearchStrategy (apache#9132)
  [Frontend][PyTorch] support for quantized conv_transpose2d op (apache#9133)
  [UnitTest] Parametrized test_conv2d_int8_intrinsics (apache#9143)
  ...
Mousius added a commit to Mousius/tvm that referenced this pull request Oct 1, 2021
Using the new name transformations added in apache#9088, the C interface API is now generated in C++ rather than in Python. This is intended to be a no-op for the actual users of this change and thus I've undone some of my overzealous sanitizing to match that expectation.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes apache#8792
Mousius added a commit to Mousius/tvm that referenced this pull request Oct 7, 2021
Using the new name transformations added in apache#9088, the C interface API is now generated in C++ rather than in Python. This is intended to be a no-op for the actual users of this change and thus I've undone some of my overzealous sanitizing to match that expectation.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes apache#8792
Mousius added a commit to Mousius/tvm that referenced this pull request Oct 7, 2021
Using the new name transformations added in apache#9088, the C interface API is now generated in C++ rather than in Python. This is intended to be a no-op for the actual users of this change and thus I've undone some of my overzealous sanitizing to match that expectation.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes apache#8792
Mousius added a commit to Mousius/tvm that referenced this pull request Oct 7, 2021
Using the new name transformations added in apache#9088, the C interface API is now generated in C++ rather than in Python. This is intended to be a no-op for the actual users of this change and thus I've undone some of my overzealous sanitizing to match that expectation.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes apache#8792
manupak pushed a commit that referenced this pull request Oct 8, 2021
Using the new name transformations added in #9088, the C interface API is now generated in C++ rather than in Python. This is intended to be a no-op for the actual users of this change and thus I've undone some of my overzealous sanitizing to match that expectation.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes #8792
masahi pushed a commit to Laurawly/tvm-1 that referenced this pull request Oct 14, 2021
Using the new name transformations added in apache#9088, the C interface API is now generated in C++ rather than in Python. This is intended to be a no-op for the actual users of this change and thus I've undone some of my overzealous sanitizing to match that expectation.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes apache#8792
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
* Introduce centralised name transformation functions

To address some of the concerns raised in apache#8280 and apache#8720 I've put together a series of functions to combine together names to re-use between these areas. These are meant to be a starting point to fix up the name generation to use the TVM C conventions and port the interface API header to C++.

These functions will also be used for constructing the names in the C Device API (apache/tvm-rfcs#31).

* Improve error handling and error messages

* Sanitize sanitise to sanitize

This patch aims to sanitize uses of sanitise to the form of sanitize to be consistent with the overall codebases use of American English.
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
Using the new name transformations added in apache#9088, the C interface API is now generated in C++ rather than in Python. This is intended to be a no-op for the actual users of this change and thus I've undone some of my overzealous sanitizing to match that expectation.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes apache#8792
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* Introduce centralised name transformation functions

To address some of the concerns raised in apache#8280 and apache#8720 I've put together a series of functions to combine together names to re-use between these areas. These are meant to be a starting point to fix up the name generation to use the TVM C conventions and port the interface API header to C++.

These functions will also be used for constructing the names in the C Device API (apache/tvm-rfcs#31).

* Improve error handling and error messages

* Sanitize sanitise to sanitize

This patch aims to sanitize uses of sanitise to the form of sanitize to be consistent with the overall codebases use of American English.
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
Using the new name transformations added in apache#9088, the C interface API is now generated in C++ rather than in Python. This is intended to be a no-op for the actual users of this change and thus I've undone some of my overzealous sanitizing to match that expectation.

Follow up PRs will clean up any remaining name transformation inconsistencies.

Fixes apache#8792
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.

3 participants