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

[Arith] Add tvm::arith::PresburgerSetNode to work with Presburger Set in MLIR #14690

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

multiverstack-intellif
Copy link
Contributor

@multiverstack-intellif multiverstack-intellif commented Apr 21, 2023

Add basic structure for arith::PresburgerSet to work with mlir::PresburgerSet as the 1st step for apache/tvm-rfcs#99 , also together with some other necessary modifications:

  • Add USE_MLIR (default OFF) as the switch to enable the feature or not.
  • Move some reflection related class definition to header file for type checking convenience in other places.

cc @tqchen @wrongtest-intellif @Hzfengsy @junrushao

@tvm-bot
Copy link
Collaborator

tvm-bot commented Apr 21, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

@multiverstack-intellif multiverstack-intellif force-pushed the intset branch 2 times, most recently from 63ca050 to 26fc12e Compare April 21, 2023 08:20
src/arith/integer_set.h Outdated Show resolved Hide resolved
src/node/reflection.cc Outdated Show resolved Hide resolved
@multiverstack-intellif multiverstack-intellif marked this pull request as ready for review April 22, 2023 00:45
@multiverstack-intellif multiverstack-intellif changed the title [Arith] Add IntegerSetNode to work with Presburger Set [Arith] Add PresburgerSetNode to work with Presburger Set Apr 22, 2023
@multiverstack-intellif multiverstack-intellif changed the title [Arith] Add PresburgerSetNode to work with Presburger Set [Arith] Add tvm::arith::PresburgerSetNode to work with Presburger Set in MLIR Apr 22, 2023
@multiverstack-intellif multiverstack-intellif force-pushed the intset branch 3 times, most recently from 3c6d01e to 9a24a83 Compare April 23, 2023 01:14
@multiverstack-intellif multiverstack-intellif force-pushed the intset branch 2 times, most recently from 3262591 to ddbe714 Compare May 2, 2023 01:23
@multiverstack-intellif
Copy link
Contributor Author

@tvm-bot rerun

src/arith/presburger_set.h Outdated Show resolved Hide resolved
cmake/utils/FindLLVM.cmake Show resolved Hide resolved
src/arith/presburger_set.h Show resolved Hide resolved
src/arith/presburger_set.h Outdated Show resolved Hide resolved
src/arith/presburger_set.cc Outdated Show resolved Hide resolved
@multiverstack-intellif multiverstack-intellif force-pushed the intset branch 2 times, most recently from 7e8bf08 to 8697d7b Compare May 27, 2023 11:54
@multiverstack-intellif
Copy link
Contributor Author

@tvm-bot rerun

@Hzfengsy
Copy link
Member

Hzfengsy commented Jun 1, 2023

any updates?

@wrongtest-intellif
Copy link
Contributor

LGTM!

Now the change seems incremental only and do not require any change to the basic runtime. Could we merge it and go on? cc @Hzfengsy @tqchen

@Hzfengsy Hzfengsy merged commit 483a8c3 into apache:main Aug 23, 2023
junrushao pushed a commit that referenced this pull request Aug 31, 2023
Hi folks,

Some fixes for MLIR based analyzer module introduced by #14690 .

---

* Make CMake at par with LLVM info:
```
{...}
-- Use llvm-config=llvm-config-64
-- LLVM libdir: /usr/lib64
-- Found MLIR
-- Build with MLIR
-- Set TVM_MLIR_VERSION=160
-- Found LLVM_INCLUDE_DIRS=/usr/include
{...}
--    USE_MKL                            : OFF
--    USE_MLIR                           : ON
--    USE_MSVC_MT                        : OFF
{...}
```

* Fix several compilation errors:
```
error: cannot convert 'llvm::SmallVector<long int>' to 'llvm::ArrayRef<mlir::presburger::MPInt>'
error: no matching function for call to 'tvm::IntImm::IntImm(tvm::runtime::DataType, mlir::presburger::MPInt&)'
note:   no known conversion for argument 2 from 'mlir::presburger::MPInt' to 'int64_t' {aka 'long int'}
```

Tested using: ```llvm/mlir 16.0.6```, ```llvm/mlir 15.0.7```,  ```llvm/mlir 17.0.0rc3```
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.

6 participants