-
Notifications
You must be signed in to change notification settings - Fork 517
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
License and readme changes to align with inclusion in LLVM. #1
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
stellaraccident
commented
Jul 31, 2020
- Updates the LICENSE to the same verbiage as used in the circt project.
- Adds the incubator disclaimer to the README.
- Reworks the introduction of the README to more accurately reflect the eventual scope.
- There is a fair amount of further rework of the repo that needs to take place. This is just the minimal cosmetic changes now that it is part of LLVM.
silvasean
approved these changes
Jul 31, 2020
nice! |
* Updates the LICENSE to the same verbiage as used in the circt project. * Adds the incubator disclaimer to the README. * Reworks the introduction of the README to more accurately reflect the eventual scope. * There is a fair amount of further rework of the repo that needs to take place. This is just the minimal cosmetic changes now that it is part of LLVM.
stellaraccident
force-pushed
the
importreadme
branch
from
August 1, 2020 03:51
a140528
to
a55d6fd
Compare
saeta
referenced
this pull request
in saeta/mlir-npcomp
Dec 31, 2020
Committing this as a snapshot of progress, but this code organization approach is not scalable. Output: Got a dialect for op %0 = rd.range %c1_i64 to %c3_i64 : (i64, i64) -> !rd.Dataset: rd walkOp name stringref: 'rd.range' Made a create fn: llvm.func internal @__rd_create_foo_fix_me(%arg0: !llvm.ptr<struct<(i64, i64)>>) { %0 = llvm.mlir.constant(0 : index) : !llvm.i64 %1 = llvm.mlir.constant(1 : index) : !llvm.i64 %2 = llvm.getelementptr %arg0[%0, %0] : (!llvm.ptr<struct<(i64, i64)>>, !llvm.i64, !llvm.i64) -> !llvm.ptr<struct<(i64, i64)>> %3 = llvm.getelementptr %arg0[%0, %1] : (!llvm.ptr<struct<(i64, i64)>>, !llvm.i64, !llvm.i64) -> !llvm.ptr<struct<(i64, i64)>> %c1_i64 = constant 1 : i64 %c3_i64 = constant 3 : i64 llvm.store %2, %c1_i64 : i64 llvm.store %3, %c3_i64 : i64 return } Made a next function: llvm.func internal @__rd_next_foo_fix_me(%arg0: !llvm.ptr<struct<(i64, i64)>>) -> !llvm.struct<(i1, i64)> { %0 = llvm.mlir.constant(0 : index) : !llvm.i64 %1 = llvm.mlir.constant(1 : index) : !llvm.i64 %2 = llvm.getelementptr %arg0[%0, %0] : (!llvm.ptr<struct<(i64, i64)>>, !llvm.i64, !llvm.i64) -> !llvm.ptr<struct<(i64, i64)>> %3 = llvm.getelementptr %arg0[%0, %1] : (!llvm.ptr<struct<(i64, i64)>>, !llvm.i64, !llvm.i64) -> !llvm.ptr<struct<(i64, i64)>> %4 = llvm.load %2 : !llvm.ptr<struct<(i64, i64)>> %5 = llvm.load %3 : !llvm.ptr<struct<(i64, i64)>> %6 = "llvm.add"(%4, %1) : (!llvm.struct<(i64, i64)>, !llvm.i64) -> !llvm.struct<(i64, i64)> %7 = llvm.icmp "ne" %4, %5 : !llvm.struct<(i64, i64)> llvm.store %2, %6 : !llvm.struct<(i64, i64)> return %7, %6 : !llvm.i1, !llvm.struct<(i64, i64)> } Did some sugary! Things now look like: module { func @main() { %c1_i64 = constant 1 : i64 %c3_i64 = constant 3 : i64 %0 = llvm.mlir.constant(1 : index) : !llvm.i64 %1 = llvm.alloca %0 x !llvm.struct<(i64, i64)> : (!llvm.i64) -> !llvm.ptr<struct<(i64, i64)>> llvm.call @__rd_create_foo_fix_me(%1) : (!llvm.ptr<struct<(i64, i64)>>) -> () %valid, %value = rd.iterator_next %1 : (!llvm.ptr<struct<(i64, i64)>>) -> (i1, i64) "rd.print"(%value) : (i64) -> () return } } Walking users.... found: rd.iterator_next... MATCHING! Walking users.... found: llvm.call... didn't match. Did some more sugary! Things now look like: module { func @main() { %c1_i64 = constant 1 : i64 %c3_i64 = constant 3 : i64 %0 = llvm.mlir.constant(1 : index) : !llvm.i64 %1 = llvm.alloca %0 x !llvm.struct<(i64, i64)> : (!llvm.i64) -> !llvm.ptr<struct<(i64, i64)>> llvm.call @__rd_create_foo_fix_me(%1) : (!llvm.ptr<struct<(i64, i64)>>) -> () %2 = llvm.call @__rd_next_foo_fix_me(%1) : (!llvm.ptr<struct<(i64, i64)>>) -> !llvm.struct<(i1, i64)> %3 = llvm.extractvalue %2[0 : i32] : !llvm.struct<(i1, i64)> %4 = llvm.extractvalue %2[1 : i32] : !llvm.struct<(i1, i64)> "rd.print"(%4) : (!llvm.struct<(i1, i64)>) -> () return } } Stack dump: 0. Program arguments: /usr/local/google/home/saeta/src/mlir-npcomp/build/bin/npcomp-opt basic.mlir -rd-lower-to-llvm #0 0x00007f607c4110b3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/llvm/lib/Support/Unix/Signals.inc:563:13 #1 0x00007f607c40f330 llvm::sys::RunSignalHandlers() /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/llvm/lib/Support/Signals.cpp:72:18 llvm#2 0x00007f607c411575 SignalHandler(int) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3 llvm#3 0x00007f608108e140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140) llvm#4 0x00007f60804fe420 llvm::ilist_node_base<true>::isSentinel() const /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/llvm/include/llvm/ADT/ilist_node_base.h:45:36 llvm#5 0x00007f60804fe420 llvm::ilist_node_base<true>::isKnownSentinel() const /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/llvm/include/llvm/ADT/ilist_node_base.h:46:41 llvm#6 0x00007f60804fe420 llvm::ilist_iterator<llvm::ilist_detail::node_options<mlir::Operation, true, false, void>, false, false>::operator*() const /usr/local/google/home/saeta/src/mlir-npcom p/external/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:138:5 llvm#7 0x00007f60804fe420 llvm::early_inc_iterator_impl<llvm::ilist_iterator<llvm::ilist_detail::node_options<mlir::Operation, true, false, void>, false, false> >::operator*() /usr/local/google /home/saeta/src/mlir-npcomp/external/llvm-project/llvm/include/llvm/ADT/STLExtras.h:546:12 llvm#8 0x00007f60804fe420 mlir::detail::walk(mlir::Operation*, llvm::function_ref<void (mlir::Operation*)>) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/mlir/lib/IR/Visito rs.cpp:41:27 llvm#9 0x00007f60804fe43c mlir::detail::walk(mlir::Operation*, llvm::function_ref<void (mlir::Operation*)>) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/mlir/lib/IR/Visito rs.cpp:0:9 llvm#10 0x00007f6080e7fbf8 std::enable_if<(!(llvm::is_one_of<mlir::NPCOMP::rd::MakeIteratorOp, mlir::Operation*, mlir::Region*, mlir::Block*>::value)) && (std::is_same<void, void>::value), void> ::type mlir::detail::walk<(anonymous namespace)::LowerToRuntimePass::runOnOperation()::'lambda'(mlir::NPCOMP::rd::MakeIteratorOp), mlir::NPCOMP::rd::MakeIteratorOp, void>(mlir::Operation*, ( anonymous namespace)::LowerToRuntimePass::runOnOperation()::'lambda'(mlir::NPCOMP::rd::MakeIteratorOp)&&) /usr/local/google/home/saeta/src/mlir-npcomp/build/install-mlir/include/mlir/IR/Visi tors.h:119:3 llvm#11 0x00007f6080e7fb90 void mlir::Operation::walk<(anonymous namespace)::LowerToRuntimePass::runOnOperation()::'lambda'(mlir::NPCOMP::rd::MakeIteratorOp), void>((anonymous namespace)::LowerT oRuntimePass::runOnOperation()::'lambda'(mlir::NPCOMP::rd::MakeIteratorOp)&&) /usr/local/google/home/saeta/src/mlir-npcomp/build/install-mlir/include/mlir/IR/Operation.h:527:5 llvm#12 0x00007f6080e7fb03 void mlir::OpState::walk<(anonymous namespace)::LowerToRuntimePass::runOnOperation()::'lambda'(mlir::NPCOMP::rd::MakeIteratorOp), void>((anonymous namespace)::LowerToR untimePass::runOnOperation()::'lambda'(mlir::NPCOMP::rd::MakeIteratorOp)&&) /usr/local/google/home/saeta/src/mlir-npcomp/build/install-mlir/include/mlir/IR/OpDefinition.h:178:5 llvm#13 0x00007f6080e7f876 (anonymous namespace)::LowerToRuntimePass::runOnOperation() /usr/local/google/home/saeta/src/mlir-npcomp/build/../lib/Dialect/RD/Transforms/LowerToLLVM.cpp:189:33 llvm#14 0x00007f6080522617 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/mli r/lib/Pass/Pass.cpp:0:11 llvm#15 0x00007f6080525917 mlir::failed(mlir::LogicalResult) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/mlir/include/mlir/Support/LogicalResult.h:47:23 llvm#16 0x00007f6080525917 mlir::detail::OpToOpPassAdaptor::runPipeline(llvm::iterator_range<llvm::pointee_iterator<std::unique_ptr<mlir::Pass, std::default_delete<mlir::Pass> >*, mlir::Pass> >, mlir::Operation*, mlir::AnalysisManager, bool) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/mlir/lib/Pass/Pass.cpp:402:9 llvm#17 0x00007f6080525917 mlir::PassManager::run(mlir::Operation*) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/mlir/lib/Pass/Pass.cpp:817:13 llvm#18 0x00007f608055b69f mlir::failed(mlir::LogicalResult) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/mlir/include/mlir/Support/LogicalResult.h:47:23 llvm#19 0x00007f608055b69f performActions(llvm::raw_ostream&, bool, bool, llvm::SourceMgr&, mlir::MLIRContext*, mlir::PassPipelineCLParser const&) /usr/local/google/home/saeta/src/mlir-npcomp/ex ternal/llvm-project/mlir/lib/Support/MlirOptMain.cpp:75:7 llvm#20 0x00007f608055a26d processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, bool, bool, bool, bool, mlir::PassPipelineCLParser con st&, mlir::DialectRegistry&) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/mlir/lib/Support/MlirOptMain.cpp:109:12 llvm#21 0x00007f6080559ff5 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, mlir::PassPipelineCLParser const&, mlir::DialectRe gistry&, bool, bool, bool, bool, bool) /usr/local/google/home/saeta/src/mlir-npcomp/external/llvm-project/mlir/lib/Support/MlirOptMain.cpp:146:10 llvm#22 0x000000000040d2ef main /usr/local/google/home/saeta/src/mlir-npcomp/build/../tools/npcomp-opt/npcomp-opt.cpp:91:14 llvm#23 0x00007f607b688d0a __libc_start_main ./csu/../csu/libc-start.c:308:16 llvm#24 0x000000000040ceca _start (/usr/local/google/home/saeta/src/mlir-npcomp/build/bin/npcomp-opt+0x40ceca) Segmentation fault
qedawkins
referenced
this pull request
in nod-ai/torch-mlir
Oct 3, 2022
* wip, commit before merging with upstream * organize API, return wrapped output * enable onnx backend test * undo unintentional commit * fix krnl ops tablegen * format krnl ops * reorder fillDynMemRefWithMemRef to be after fillPtrToMemRefWithDynMemRef, better comments * more onnx backend tests * ensure that test names refer to existing tests * improve code readability by shortening type names * nit * restore unintentional changes * more nits * fix ; -> : * split runtime implementation into header and body file, add support for data types * comment on the onnx backend test * make the comments read better * do not dump when lowering
qedawkins
referenced
this pull request
in nod-ai/torch-mlir
Oct 3, 2022
clean up, remove dependency for boost
qedawkins
referenced
this pull request
in nod-ai/torch-mlir
Oct 3, 2022
* Lower MaxPoolSingleOutOp to Krnl dialect * Edit comments * Update changes according to the new folder structure * Add MLIR tests * Support ceil_mode * Merge the first two krnl loops into one krnl loop; remove attribute checks * Dynamically allocate memory for the result if the result has unknown dimensions Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
qedawkins
referenced
this pull request
in nod-ai/torch-mlir
Oct 3, 2022
* Update .travis.yml * add Z and Power builds * Build (#1) * prereq build for Z and Power * prereq build for Z and Power * prereq build for Z and Power * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * Update MLIR version * test build * test build * Update MLIR version * test build * test build * test build * test build * test build * test build * test build * test build * test build * test build * test build * test build * test build * test build
qedawkins
referenced
this pull request
in nod-ai/torch-mlir
Oct 3, 2022
…lvm#443) * Reorganize main function. * Follow review comments. * Emit constants are globals in Krnl and LLVM dialects. * Fix global emission when value is returned. * Format. * Remove comment. * Enable size tests.
mgehre-amd
referenced
this pull request
in Xilinx/torch-mlir
Mar 21, 2023
Support quantization to unsigned int8
arames
pushed a commit
to arames/torch-mlir
that referenced
this pull request
May 12, 2023
Update torch-mlir to pick up upstream fixes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.