-
Notifications
You must be signed in to change notification settings - Fork 189
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
Feature/egraph extract constrains #1175
Merged
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
zhen8838
approved these changes
Mar 11, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1175 +/- ##
==========================================
+ Coverage 73.03% 73.26% +0.23%
==========================================
Files 707 706 -1
Lines 26042 25960 -82
Branches 4247 4229 -18
==========================================
+ Hits 19019 19020 +1
+ Misses 6377 6294 -83
Partials 646 646
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
zhen8838
added a commit
that referenced
this pull request
Apr 12, 2024
* Add cpu module * Fix build * Pass unary * Use custom pe loader * Remove unused code * Skip some tests cpu codegen doesn't support * Add linux support * Fix win * Fix * Fix macos * Add pack * Add macho loader * Fix unary test * fix call function * Add -fno-stack-protector * Fix find vs * Add sinh cosh * Add linear_size() * Fix macos * Add square * Add sign * Add ntt(nncase tensor template) * Fix macos * Fix macos * Add rsqrt * Import memcpy for gcc * Disable lto * Compile-time apply * Add binary * Setup ninja * Fix build * Fix build * Fix slicing codegen * Fix findvc * Fix build * Disable macos cpu module * Add pow * Link __chkstk on win32 * Avoid stackoverflow * Optimize unary apply * Fix build * Update unary impl * Fix build * Add l2 fuse * fix test * Add missing parts * Update * Add AllocateBufferView * Pass test simple unary * add rewriter * fix codegen * fix elf loader * fix mac build * fix ci * fix ci * Move AffineMap * Fix ut * fix mac build * Add Affine.Grid * Start to code auto tiling * refactor code * pass packed layernorm * add binary * add binary test * Try matmul tiling * More generic cost * Tiling: parameterize * pass unittests * format * reverse cpu target * add packed kernel * add unary simd support * Add grid auto tile * fix ci * fix mac build * fix linux build * fix packed matmul evaluator * disable cnblogs source * Chain the pipeline * Add allocate buffer scope * fix dotnet build * add packing * refactor vector type * fix vector type * fix cmake path * add x86 pack unpack kernel * Move auto tile to schedule proj * Revert "add Razor.Templating.Core (#1169)" (#1173) This reverts commit 2498b1b. * Fix win build * fix repeated AutoPacking * fix mac build * Add buffer subview * Fix cmakelist template * Fix win32 runtime build * fix mac test * add layer norm * skip the failed case * add layer norm case * fix layernorm test * Feature/update docs (#1174) * update faq * update Homepage * update link * update gif link * update gif link * Feature/egraph extract constrains (#1175) * add egraph-extract-constrains * reorder SwapBinaryArgs * pass packed layer norm * fix mac build * fix packed transpose vi * add arm neon packed softmax * add packed softmax * fix mac ci * add blame * add 1d packed matmul * disable pack test * add packed matmul * fix mac * add packed matmul * add more kernel * refactor cpu kernels test * fix some bug * Feature/update docs (#1176) * update faq * update Homepage * update link * update gif link * update gif link * update FAQ * update FAQ * add copy * fix ci * fix mac build * fix mac build * add gather * Add ranked_shape support for pack and some test cases. * compile decode layer success * Add ranked_shape support for unpack and some test cases. * fix bug * Support softmax axis != packed axis for packed_softmax. * add buffer schedule * fix mac loader * pass mac loader * opt copy and matmul * pass 65b decode layer * fix ci * Fix layer norm axis > pack axis and support broadcasting for scale/bias. * add pad/fix bugs * fix packed layer norm * fix arm vector 4 reduce sum * add packed layernorm case * fix ci * Remove unused deps * Refactor ntt * Fix * fix linux ci * Fix build * Fix build on Ubuntu. * Add aarch64 types * fix mac build * Fix build * Fix load model with binary mode * Use M1 runners * Use python 3.10 * Use python 3.10 * Fix macos CI * Remove halide * Remove halide * Skip TestDecodeLayer in CI * Add ctest for ntt and fix unary bugs. * Rename ctest files to avoid confliction. * Fix msvc empty bases bug * Fix build * onnxoptimizer==0.2.7 * Update vulkan * Update torch * Update mac vulkan * Remove caffe * Update CI * Upgrade packages * Move setup python * Fix win deps * Remove omp * debug * Add floor_mod and ctest cases for ntt binary. * Add bin to python search path * Remove gsl * Fix build * Fix build * Fix win test * Disable F.InterpolationMode.BILINEAR * Disable test_conv2d_transpose * Disable test_expand_dims * Disable test_fully_connected * Disable test_conv2d_prelu * Disable test_squeeze_transpose_shape * Add x86_64 avx optimization and test cases for unary. * Disable test_mobilenetv1 * Disable test_mobilenetv2 * add im2col * add im2col * add instance norm * add resize image * add cpuconv2d * add target options * fix macho loader * update ntt instance norm * pass sd vae dec * fix linux ci * fix windows bug * Apply code-format changes * fix mac test * restore the cpu runtime.cpp --------- Co-authored-by: sunnycase <sunnycase@live.cn> Co-authored-by: Curio Yang <39184746+curioyang@users.noreply.github.com> Co-authored-by: huochenghai <huochenghai@canaan-creative.com> Co-authored-by: zhangyang2057 <zhangyang@canaan-creative.com> Co-authored-by: zhen8838 <zhen8838@users.noreply.github.com>
sunnycase
added a commit
that referenced
this pull request
Mar 7, 2025
* Revert "add Razor.Templating.Core (#1169)" (#1173) This reverts commit 2498b1b. * Feature/update docs (#1174) * update faq * update Homepage * update link * update gif link * update gif link * Feature/egraph extract constrains (#1175) * add egraph-extract-constrains * reorder SwapBinaryArgs * Feature/update docs (#1176) * update faq * update Homepage * update link * update gif link * update gif link * update FAQ * update FAQ * fix fold binary (#1182) * Fix macos-latest doesn't support python 3.7 issue. (#1194) * Fix macos-latest doesn't support python 3.7 issue. * Set macos version to 12(13 uses Xcode 15). * Feature/add xsgetn for char array buffer (#1198) * Load multiple characters at once * Apply code-format changes * fix build --------- Co-authored-by: curioyang <curioyang@users.noreply.github.com> * qemu system mode (#1201) * close non-equal split * fix typeinfer of conv2d * fix fold binary * do not swap binary args * update setup.py * do not pre-preprocess onnx with external data * imgnore .mono in git * restore SwapBinaryArgs * fix onnx test runner --------- Co-authored-by: sunnycase <sunnycase@live.cn> * fix reduce sum opset condition (#1203) * fix reduce sum opset condition * Update Reduce.cs * fix reduce operators consisting of reduce_sum. fix #1193 * support layernorm channel first(C#) (#1204) * support LayerNorm channel first * fix review : https://github.com/kendryte/nncase/pull/1204\#discussion_r1599285210 * Remove unavailable nuget source(nuget.cnblogs.com). (#1207) * update set dotnet env (#1209) * update set dotnet env * fix externel data (#1215) * no module constrain for fusion eval * fix external data larger than 2GB * power of 2 to square * change buffer size from int to long * update docs link (#1213) * update docs link * update demo link * Fix/normal reduce sum (#1214) * fix bug * add reduce sum test * update test * add tips for bug in homepage * fix condition * fix MSVC_VERSION 1930-1949 = VS 17.0 (v143 toolset) link:https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html * Update compiler-build.yml * fix build: downgrade windows-os version to 2019 * Feature/linux runtime (#1222) * fix dtype compare * add linux runtime build toolchain and config * split rtos and linux toolchains * upgrade rvv code to rvv intrinsic v1.0 * rename toolchain * format rvv memcpy * Revert "upgrade rvv code to rvv intrinsic v1.0" This reverts commit 414f749. * gcc14+musl-kernel * recover rvv code * support linux runtime, clock() not correct 20240718 * use thead gcc-10.4. fix ci about pip version conflict with python3.7 * remove redundant code * Apply code-format changes * fix pip version for python3.7 * add LINUX_RUNTIME flag for op profile --------- Co-authored-by: curioyang <curioyang@users.noreply.github.com> * remove tips (#1224) * Add extra compile option to be compatible with k230 linux sdk. (#1227) * Add extra compile option to be compatible with k230 linux sdk. * Try to remove cp37 and set auditwheel==6.0.0. * fix numpy non contiguous (#1232) * fix numpy non-contiguous. * replace rapidjson * Apply code-format changes --------- Co-authored-by: huochenghai <huochenghai@canaan-creative.com> Co-authored-by: curioyang <curioyang@users.noreply.github.com> * Upgrade conan2 (#1242) (#1244) * Upgrade conan2 (#1242) * upgrade conan2 * update ci * add install lib * close vulkan * update kernel tests * test exclude win * test kernel tests * fix rv runtime build * fix cmake cmd * fix conan install args * test * fix python packages dependence * Apply code-format changes * fix python build * fix python build * fix python build * fix python build * fix python build * fix python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * Apply code-format changes * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * downgrade python lib * debug dotnet * all test * all test * all test * all test * fix python build whl * fix remove file * fix error * fix error * fix error * fix error * close mac python whl * fix error * fix intrinsic args * disable ctest * enable mac build python whl * try fix python build * Revert "try fix python build" This reverts commit b934f15. * try fix python build * Revert "try fix python build" This reverts commit 233bad4. * try fix macos python build * check build dir with wrong macos * fix cmd * debug * ssh debug * fix mac build error * remove debug code * start to debug windows ci * upgrade windows version * debug ssh * fix win build * debug * fix error in windows python build wheel * fix ninja dependence * fix ninja dependence * fix ninja dependence * fix ninja dependence * fix lib miss * fix path error * fix ninja * fix ninja * fix ninja * disable linux mac * recover conanfile path replace * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * python build ok * debug test compiler * debug * debug * debug * recover * debug * debug * Revert "debug" This reverts commit b666dae. * change windows version * disable windows test-compiler * Use gcc-14 * Add missing files * Fix dependencies * Fix dependencies * Fix dependencies * Fix dependencies * Fix dependencies * Disable F.InterpolationMode.BILINEAR * Apply code-format changes * Disable tflite conv2d_transpose * Disable tflite expand_dims * Disable more tflite * Fix CI * Fix python build * Apply code-format changes * Fix * Fix * Enable macos * Fix * Enable win * Fix --------- Co-authored-by: curioyang <curioyang@users.noreply.github.com> Co-authored-by: yanghaoqi <yanghaoqi_intern@canaan-creative.com> Co-authored-by: sunnycase <sunnycase@live.cn> Co-authored-by: sunnycase <sunnycase@users.noreply.github.com> * Feature/add_k230_conan2_compile (#1267) * fix cmake path * support 230 build * Fix sat extractor (#1243) * fix sat extractor * update egraph extractor --------- Co-authored-by: sunnycase <sunnycase@live.cn> * update preprocess for pipeline (#1240) * fix unsqueeze typeinfer * hardcode for prefill and decode * Fix stackvm * fix shape var order * fix onnxruntime * revert for extract deadlock * force stackvm layernorm to rms norm * Fix layernorm & unsqueeze test * Quantize weights to bf16 * disable dump * add llm mode * fix egraph * fix build * fix release build * Fix LeaGP * Add tmp * Fix build * Fix shape bucket * add fast eval * Fix * Fix const copy * fix PartialShapeEvaluator * modify RegisterBucketPass * Fix shape bucket * Disable some buckets * speed up * fix release build * support qwen quant layer * Fix build * Fix If * Fix shape bucket * staticlize check qwen * inherit metadata in shape bucket * speed up dump ir * conv2d to matmul * split KPU time from EXTCALL * remove comment * fix merge fusion without marker * Add quant scheme to cli * Fix shape bucket & pad * fix quant json output * Fix RecordFusionBucket * Merge const range of marker only * Add init impl for riscv64 matmul. * refactor MergeBucketFusionPass * disable dump ir in marge bucket fusion * fix bucket fusion merger * fix bucket fusion merger * Simplify Expand & Reshape importer * recover config * Enable binary bucket * recover dump quantScheme file path * fold q deq * Add reshape expand * Remove unused vars * add get bychannel range * split matmul * Add FoldConv2DBiasWithMarker * fix build * fix build * slice to 5 slices * add merge prim func * Refactor type infer * Fix type infer * Add infer range * add shape const * fix auto dist * Print dim with script * refactor il printer * Refactor symbolic shape: Make shape as expr & Visit attributes * Fix * Add more shape optimization * Unboxing for shape expr * optimize dot dumper * Use max size in bufferization * fix dumpper bug * Fix reshape type infer * Add Dimension.ProdWithDynamicAsMaxValue * Feature/opt boxing (#1282) * add opt boxing * add filter * pass ut * don't allow gather reduce with reshape * fix reshape typeinfer bug * add full search space * fix compile bug * remove fold boxing * add latency in cpu options * fix bug * fix build * Apply code-format changes * fix build * fix build * fix ci * fix lstm * fix cycle * fix ci * fix boxing type infer * fix dotnet test --------- Co-authored-by: zhen8838 <zhen8838@users.noreply.github.com> * Auto Fusion Stage 1 (#1290) * wip * fix tiling * update * add mcts * fix condensation * enable auto tiling * fix ci * add more tile graph test * fix cache data section generate * revert liveness * fix build * disable the optimzation about inplace * Apply code-format changes * fix build --------- Co-authored-by: zhen8838 <zhen8838@users.noreply.github.com> * Refactor Graph Partition (#1291) * refactor graph partition * using new graph partition in auto tile * Apply code-format changes * fix function name * fix tiling * Apply code-format changes * fix build * fix graph partition * fix ci * fix distributed graph partition * fix dotnet 9 build * fix ci * fix ci --------- Co-authored-by: zhen8838 <zhen8838@users.noreply.github.com> * Feature/Further Tiling (#1292) * transpose unpack tiling * add reduce/cast tiling * fix cast tiling --------- Co-authored-by: zhen8838 <zhen8838@users.noreply.github.com> * Fix/glm (#1293) * fix copy optimization of tiling * fxi unsqueeze eval with negative axis * fold ugly expand of glm model * fix build * merged * fix reshape * revert auto dist * Fix RemoveBoxing * fix graph partition * Fix codegen&runtime for dynamic shapes * Fix tests * Fix CI * Fix CI * Fix CI * Fix UT * Fix UT * Fix test_require.cpp * Fix UT * Fix UT * assign new var when if is a fusion's input * Fix UT * Fix UT * refactor fusion merge test by using new graph partition implment * enable UnitTestFusionGroup * Fix UT * skip egraph function merge * Disable test constant of shape * Fix pytests * Fix race condition of vargs pattern * Enable UnitTestCPUKernels * fix test * Fix test quantizelinear * Fix reshape typeinfer - support 0 * Add optimization to Dimension.Select * Fix type infer of Resize & Add index support to expr * Fix type infer of slice * Fix type infer of Expand * Fix ReduceArg of TFLite importer * Remove SimplifyForDimension cache * Disable test_onehot * Fix ncnn test * Apply code-format changes --------- Co-authored-by: Curio Yang <39184746+curioyang@users.noreply.github.com> Co-authored-by: huochenghai <huochenghai@canaan-creative.com> Co-authored-by: zhangyang2057 <zhangyang@canaan-creative.com> Co-authored-by: curioyang <curioyang@users.noreply.github.com> Co-authored-by: yanghaoqi <yanghaoqi_intern@canaan-creative.com> Co-authored-by: sunnycase <sunnycase@users.noreply.github.com> Co-authored-by: 郑启航 <597323109@qq.com> Co-authored-by: guodongliang <guodongliang@canaan-creative.com> Co-authored-by: Curio Yang <curioyhq@gmail.com> Co-authored-by: zhen8838 <zhen8838@users.noreply.github.com>
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.
cherry-pick restored commit: