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

Migrate C Interface API Generation to C++ #9106

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

Mousius
Copy link
Member

@Mousius Mousius commented Sep 24, 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

Mousius added a commit to Mousius/tvm that referenced this pull request Sep 24, 2021
Google Mock is the mocking/helper framework that gets bundled with Google Test, it used to be separate but now isn't.  I ran into the issue of Google Mock not being configured fully in the i386 build of apache#9106, which uses the `HasSubtr` matcher. This PR aims to fully configure Google Mock for use, which is interesting in itself...

The headers are installed as part of Ubuntu 18.04's `googletest` package:

```shell
$ dpkg -S /usr/include/gmock/
googletest:amd64: /usr/include/gmock
```

But not the lib sources, that requires another package named `google-mock`:

```shell
$ dpkg -S /usr/src/gmock
google-mock:amd64: /usr/src/gmock
```

But in Ubuntu 16.04 the includes and lib sources are in the `google-mock` package:
```shell
$ dpkg -S /usr/include/gmock
google-mock:i386: /usr/include/gmock
$ dpkg -S /usr/src/gmock/
google-mock:i386: /usr/src/gmock
```

And excitingly, in Ubuntu 20.04 this will again be changed to `libgmock-dev` by the
looks of things, just to keep us on our toes.
areusch pushed a commit that referenced this pull request Sep 27, 2021
Google Mock is the mocking/helper framework that gets bundled with Google Test, it used to be separate but now isn't.  I ran into the issue of Google Mock not being configured fully in the i386 build of #9106, which uses the `HasSubtr` matcher. This PR aims to fully configure Google Mock for use, which is interesting in itself...

The headers are installed as part of Ubuntu 18.04's `googletest` package:

```shell
$ dpkg -S /usr/include/gmock/
googletest:amd64: /usr/include/gmock
```

But not the lib sources, that requires another package named `google-mock`:

```shell
$ dpkg -S /usr/src/gmock
google-mock:amd64: /usr/src/gmock
```

But in Ubuntu 16.04 the includes and lib sources are in the `google-mock` package:
```shell
$ dpkg -S /usr/include/gmock
google-mock:i386: /usr/include/gmock
$ dpkg -S /usr/src/gmock/
google-mock:i386: /usr/src/gmock
```

And excitingly, in Ubuntu 20.04 this will again be changed to `libgmock-dev` by the
looks of things, just to keep us on our toes.
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
Google Mock is the mocking/helper framework that gets bundled with Google Test, it used to be separate but now isn't.  I ran into the issue of Google Mock not being configured fully in the i386 build of apache#9106, which uses the `HasSubtr` matcher. This PR aims to fully configure Google Mock for use, which is interesting in itself...

The headers are installed as part of Ubuntu 18.04's `googletest` package:

```shell
$ dpkg -S /usr/include/gmock/
googletest:amd64: /usr/include/gmock
```

But not the lib sources, that requires another package named `google-mock`:

```shell
$ dpkg -S /usr/src/gmock
google-mock:amd64: /usr/src/gmock
```

But in Ubuntu 16.04 the includes and lib sources are in the `google-mock` package:
```shell
$ dpkg -S /usr/include/gmock
google-mock:i386: /usr/include/gmock
$ dpkg -S /usr/src/gmock/
google-mock:i386: /usr/src/gmock
```

And excitingly, in Ubuntu 20.04 this will again be changed to `libgmock-dev` by the
looks of things, just to keep us on our toes.
@Mousius Mousius force-pushed the interface-api-c++ branch 2 times, most recently from eaac78b to e17f69d Compare October 1, 2021 07:07
@areusch
Copy link
Contributor

areusch commented Oct 4, 2021

@Mousius lgtm but please address the CI failure

@Mousius Mousius force-pushed the interface-api-c++ branch 2 times, most recently from 2584986 to 6436b27 Compare October 7, 2021 12:59
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

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 Mousius force-pushed the interface-api-c++ branch from 6436b27 to 0897a60 Compare October 7, 2021 15:35
@manupak manupak merged commit b53472c into apache:main Oct 8, 2021
@manupak
Copy link
Contributor

manupak commented Oct 8, 2021

Thanks @Mousius @areusch!

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
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
Google Mock is the mocking/helper framework that gets bundled with Google Test, it used to be separate but now isn't.  I ran into the issue of Google Mock not being configured fully in the i386 build of apache#9106, which uses the `HasSubtr` matcher. This PR aims to fully configure Google Mock for use, which is interesting in itself...

The headers are installed as part of Ubuntu 18.04's `googletest` package:

```shell
$ dpkg -S /usr/include/gmock/
googletest:amd64: /usr/include/gmock
```

But not the lib sources, that requires another package named `google-mock`:

```shell
$ dpkg -S /usr/src/gmock
google-mock:amd64: /usr/src/gmock
```

But in Ubuntu 16.04 the includes and lib sources are in the `google-mock` package:
```shell
$ dpkg -S /usr/include/gmock
google-mock:i386: /usr/include/gmock
$ dpkg -S /usr/src/gmock/
google-mock:i386: /usr/src/gmock
```

And excitingly, in Ubuntu 20.04 this will again be changed to `libgmock-dev` by the
looks of things, just to keep us on our toes.
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.

C Interface API Generation split between Python and C++
3 participants