-
Notifications
You must be signed in to change notification settings - Fork 183
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
[DAP/Whisper]Add initial documents for Whisper Preprocessor. #313
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
5d08f61
to
e433100
Compare
zhanghb97
reviewed
Jul 14, 2024
zhanghb97
approved these changes
Jul 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
6somehow
added a commit
to 6somehow/buddy-mlir
that referenced
this pull request
Sep 26, 2024
…ion [Examples] Added MLIRLinalg Examples for Various Optimization Options. (#1) * [examples] Add mobilenet example. Co-authored-by: zhanghb97 <[email protected]> Co-authored-by: qingqing12138 <[email protected]> * [examples] Add examples for transformer-based model optimization. * [examples] Add convolution optimization examples (buddy-compiler#333) --------- Co-authored-by: FloatingcloudKnight <‘[email protected]’> * bmm2mm 0.0 * [examples] Add attention loop and fusion example. * [BuddyWhisper] Add whisper model example and Conv1d operation. Co-authored-by: zhanghb97 <[email protected]> * [examples] Add rtclock to attention fusion examples. * [thirdparty] Add riscv-gnu-toolchain as an submodule. * [RVV] Add RVV environment guide and update examples. * [examples] Annotate the llama mlir code. (buddy-compiler#337) * [thirdparty] Remove legacy RISC-V toolchain. * [frontend] Update convolution groups feature. (buddy-compiler#338) * [examples] Update Whisper README doc. * [NFC] Make buddy tests and examples depends on mlir-cpu-runner (buddy-compiler#342) * [examples] Add vector iteration example. * [DAP/Whisper]Add Whisper Preprocessor. (buddy-compiler#313) * [examples] Add MLIR CF example. * [examples] Fix cf-iteration-exit filecheck. * [example] Fix cf-iteration-exit example. * [examples] Add sigmoid and rope case. * tiling batch matmul * tiling batch matmul * [frontend] Add missing dependencies into DAP target. (buddy-compiler#357) Ninja introduced different build graph algorithm in version v1.12.0, which will required project to explicitly specify dependencies. Without this commit, ninja v1.12.0 will not link mlir-translate and llc before the DAP target and causing build failure. * bmm tile try to remove redundant subview * pass check * bmm tile try to remove redundant subview * bmm tile to vector.load/store * buddy opt add(fake rvv version) * bmm fuse for loop * bmm m n border control add * [Container] Use integrated audio decoding method. * [examples] Use container to read audio file. Co-authored-by: taiqzheng <[email protected]> * [NFC] Fix warnings. * [build system] use variable from LLVMConfig (buddy-compiler#359) * [build system] use variable from LLVMConfig In the previous build script, we always assumed that the binary and the library are relative to the MLIR_DIR variable. But this prevents buddy-mlir from properly packaging by the system. We should use the LLVMConfig.cmake file to have a more flexible build system. Signed-off-by: Avimitin <[email protected]> * [python] add install target for buddy python modules * [nix] update buddy-mlir derivation Signed-off-by: Avimitin <[email protected]> --------- Signed-off-by: Avimitin <[email protected]> * [chore] fix typo in pass manager (buddy-compiler#360) Signed-off-by: Avimitin <[email protected]> * [container] Add initial standalone image container. * remove rvv * add int support * [examples] Add initial GPU matmul transform example. * [examples] Add conv2d-nhwc-fhwc manual vectorization. * [Container] Add encoder for wav audio format. (buddy-compiler#366) * [examples] Fix rvv intrinsic. * [midend] Fix batch matmul vectorization pass. * [example] Fix typo. * [examples] LeNet E2E pipeline uses batchmatmul-optimize pass. * [examples] Fix LeNet E2E pipeline. * [examples] Add memref type generation example. * [NFC] Fix typo. * [Docs] Add Python Virtual Environment Setup Guide. (buddy-compiler#373) * [examples] Update module generation example. * add conv nhwc * add conv nhwc * oc bug repair * [Examples] Adapt Audio Container for dap examples. (buddy-compiler#369) * [Examples] Adapt the new Audio Container for 'buddy-whisper-preprocess' example. * [Examples] Adapt the new Audio container for 'buddy-biquad' example. * [Examples] Adapt the new Audio Container for 'buddy-fir' example. * [Examples] Adapt the new Audio Container for 'buddy-iir-scalar' example. * [Examples] Adapt the new Audio Container for 'buddy-iir-vectorization' example. * [DAP] Merge 'BuddyLibDAPVectorization' library into 'BuddyLibDAP' library. * [Container] Update the Audio container to support converting a MemRef (base class) object to an Audio (derived class) object. * [Examples] Adapt the new constructor in the Audio Container to facilitate the conversion of a MemRef object to an Audio object. * [Container] Handle corner case for NaN. Reset NaN to 1. * conv2d +dilation,strides * conv2d +tilling * fixed int float determine * conv2d to forall * clear useless commits * conv2d pass float test * add bmm scf * add depthwise * add depthwise correct * [DAP/Whisper] Extract RFFT operation from 'dap.whisper_preprocess'. (buddy-compiler#379) * [DAP/Whisper] Remove 'memref.copy' operation in 'dap.whisper_preprocess'. * [DAP] Extract RFFT400Op from 'dap.whisper_preprocess'. * for dev merge * [examples] add MLIRLinalg example for options: 1.conv-nhwc-fhwc-optimize 2.conv-nhwc-fhwc-tile-optimize 3.depthwise-conv-nhwc-hwc-optimize 4.batchmatmul-tile-optimize 5.batchmatmul-scf-optimize . Example mlir: batchmatmul conv2d_nhwc_fhwc depthwise_conv_2d_nhwc_hwc * [examples] add MLIRLinalg example for options: 1.conv-nhwc-fhwc-optimize 2.conv-nhwc-fhwc-tile-optimize 3.depthwise-conv-nhwc-hwc-optimize 4.batchmatmul-tile-optimize 5.batchmatmul-scf-optimize . Example mlir: batchmatmul conv2d_nhwc_fhwc depthwise_conv_2d_nhwc_hwc * Update .gitmodules * Update .gitignore * [Midend] Enhancements and Optimizations for batch matmul and convolution [Examples] Added MLIRLinalg Examples for Various Optimization Options * [Midend] Enhancements and Optimizations for batch matmul and convolution [Examples] Added MLIRLinalg Examples for Various Optimization Options. fixed thirdparty. * [Examples] Added MLIRLinalg Examples for Various Optimization Options. linalg-batch-matmul-dync.mlir fixed . --------- Signed-off-by: Avimitin <[email protected]> Co-authored-by: WuXintong123 <[email protected]> Co-authored-by: zhanghb97 <[email protected]> Co-authored-by: qingqing12138 <[email protected]> Co-authored-by: FloatingcloudKnight <[email protected]> Co-authored-by: FloatingcloudKnight <‘[email protected]’> Co-authored-by: Weijia <[email protected]> Co-authored-by: effrey-liu <[email protected]> Co-authored-by: Wu Xintong <[email protected]> Co-authored-by: Kiva <[email protected]> Co-authored-by: Taiqi Zheng <[email protected]> Co-authored-by: Jiongjia Lu <[email protected]> Co-authored-by: taiqzheng <[email protected]> Co-authored-by: ShiHaoGao <[email protected]>
ShiHaoGao
pushed a commit
to ShiHaoGao/buddy-mlir
that referenced
this pull request
Oct 18, 2024
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.
Currently, it is in draft form with some remaining work to be completed.
However, it is now capable of being used to build an end-to-end Whisper model.
Work should be done in this PR:
The
clang-format
tool offers different strategies for formatting data. Please check fileExtandDAPPass.cpp
in “Files changed”.The example has been designed, but the file location needs to be changed.
Update file locations for the
extand-dap
pass and also change the operation name.Future work, not in this PR:
The
one-shot-bufferize
pass has conflicts with some operations.Currently only one case is supported, where its audio data is directly written into the example file. To support more audio cases, we need an audio library to read data from audio files.
Some operators need to be extracted so that they can be reused in other algorithms.
After extracting the operators, design vectorization pattern for each one.