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

[test] [ir] Add a simple unit test for IRBuilder #2214

Merged
merged 2 commits into from
Mar 16, 2021

Conversation

k-ye
Copy link
Member

@k-ye k-ye commented Mar 15, 2021

Related issue = #2196, #2193

Note that I've switched from OBJECT to STATIC now. It could be too laborious to refactor the whole code base to a point where they are layered nicely. Instead, we should just create a (static) library that is unit testable by excludeing taichi/python and being python-free. Most of Taichi's dependencies will be merged into this lib, including LLVM, GLEW, etc. ( target_link_librariess() doesn't seem to be effective with an OBJECT library)

[Click here for the format server]


namespace taichi {
namespace lang {

TEST(IRBuilder, Basic) {
Copy link
Member Author

Choose a reason for hiding this comment

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

googletest is pretty easy to learn: https://google.github.io/googletest/primer.html. By having these files unit tested, we should be able to finalize our IR/passes API, while still iterating and improving the implementations.

Copy link
Member

@yuanming-hu yuanming-hu 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

@xumingkuan xumingkuan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@k-ye k-ye merged commit 588fc8f into taichi-dev:master Mar 16, 2021
@k-ye k-ye deleted the refactor-types3 branch March 16, 2021 01:40
@xumingkuan xumingkuan mentioned this pull request Apr 13, 2021
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