Skip to content

Add a dynamically shaped mhlo.dot lowering example - #2964

Merged
silvasean merged 1 commit into
iree-org:mainfrom
silvasean:add-dynamic-dot-example
Aug 25, 2020
Merged

silvasean merged 1 commit into
iree-org:mainfrom
silvasean:add-dynamic-dot-example

Conversation

@silvasean

Copy link
Copy Markdown
Contributor

I don't know how this table of contents page is generated (https://google.github.io/iree/ir-examples) or how to actually generate the final documentation page and preview it before pushing. Please advise.

@google-cla google-cla Bot added the cla: yes label Aug 20, 2020
@silvasean
silvasean requested a review from ScottTodd August 20, 2020 20:16

@ScottTodd ScottTodd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Were you able to preview the page by building the docs locally? The table of contents should be automatically generated and I wouldn't expect issues there.

Comment on lines +116 to +119
build_one_example iree/samples/ops/mhlo-dot.mlir llvm-ir
build_one_example iree/samples/ops/mhlo-dot.mlir vmla
build_one_example iree/samples/ops/mhlo-dot.mlir vulkan-spirv
build_one_example iree/samples/ops/dynamic-mhlo-dot.mlir vmla

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, this reads more clearly than the previous setup.

If the build_one_example function itself gets more complex, we should consider moving it into a separate (maybe Python?) file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I think we can use MLIR hooks to capture a more structured trace. Maybe we can generate sliders or something more dynamic showing the IR evolution over time or something.

@ScottTodd ScottTodd added documentation ✏️ Improvements or additions to documentation dynamic shapes labels Aug 25, 2020
@silvasean

Copy link
Copy Markdown
Contributor Author

Were you able to preview the page by building the docs locally? The table of contents should be automatically generated and I wouldn't expect issues there.

Yep, I looked at the .md page locally. Thanks for your help on discord.

@silvasean

Copy link
Copy Markdown
Contributor Author

For the record, the index file is edited directly on the gh-pages branch: 733f4dc#diff-d4ad6fcf3b062e6b3dbe2a806908e3a9

And the table of contents is generated by prepare_doc_publication.py in this github workflow: https://github.com/google/iree/blob/df727ae310333b274e8230acc0928e32c2f6cb8a/.github/workflows/publish_docs.yml#L44

@silvasean
silvasean merged commit 932339c into iree-org:main Aug 25, 2020
@rsuderman rsuderman mentioned this pull request Aug 25, 2020
copybara-service Bot pushed a commit that referenced this pull request Aug 25, 2020
* ebc6a83 Add lint action to check for tabs (#2984)
* 932339c Merge pull request #2964 from silvasean/add-dynamic-dot-example
* df727ae Integrate MLIR-EmitC at iml130/mlir-emitc@560cd8c (#2990)
* e824d36 Refactor for explicit dialect registration (#2978)
* 38b7d2c Allow ModelRunner to receive an array of extra symbols available during JITing..
* 264a97d Fuse linalg.tensor_reshape operations with hal.interface* operations. (#2973)
* 0e3c737 Fold flow.tensor.update when all operands are constant (#2982)
* c7a21c2 Merge pull request #2983 from rsuderman/google-to-main
* fd55a86 Add a dynamically shaped mhlo.dot lowering example

COPYBARA_INTEGRATE_REVIEW=#2993 from rsuderman:main-to-google cf0c9db
PiperOrigin-RevId: 328418928
@rsuderman rsuderman mentioned this pull request Aug 26, 2020
copybara-service Bot pushed a commit that referenced this pull request Aug 26, 2020
* f0a07f6 Allow iree.placeholder as an op between splittable ops. (#2999)
* 6bd3b1d Use hidden visibility for all symbols by default (#2997)
* d650082 VMLA Dynamic Iota support with Shape dialect work. (#2965)
* c724ee4 Add function to hide SavedModel roundtrip (#2995)
* 2fedce6 Merge pull request #2996
* c5f7030 Merge branch 'main' into google-to-main
* cf3211d [vulkan] Reset TimePointFence status when releasing back to pool (#2905)
* ebc6a83 Add lint action to check for tabs (#2984)
* 932339c Merge pull request #2964 from silvasean/add-dynamic-dot-example
* df727ae Integrate MLIR-EmitC at iml130/mlir-emitc@560cd8c (#2990)
* e824d36 Refactor for explicit dialect registration (#2978)
* 38b7d2c Allow ModelRunner to receive an array of extra symbols available during JITing..
* 264a97d Fuse linalg.tensor_reshape operations with hal.interface* operations. (#2973)
* 0e3c737 Fold flow.tensor.update when all operands are constant (#2982)
* c7a21c2 Merge pull request #2983 from rsuderman/google-to-main
* fd55a86 Add a dynamically shaped mhlo.dot lowering example

COPYBARA_INTEGRATE_REVIEW=#3003 from rsuderman:main-to-google f0a07f6
PiperOrigin-RevId: 328574119
@rsuderman rsuderman mentioned this pull request Aug 26, 2020
@GMNGeoffrey

Copy link
Copy Markdown
Member

Just a reminder to please not use merge commits for single commits like this. It adds extra noise to the history.

copybara-service Bot pushed a commit that referenced this pull request Aug 26, 2020
* 6282700 Expand the tf_module_to_compiler_module API (#3009)
* f7e561a Merge pull request #3006 from rsuderman/google-to-main
* 8341d71 Explicitly insert dialects in conversion passes (#3002)
* b7c2b60 Fix format by changing to LLVM style (#3008)
* 4286f17 Merge branch 'main' into google-to-main
* f0a07f6 Allow iree.placeholder as an op between splittable ops. (#2999)
* 6bd3b1d Use hidden visibility for all symbols by default (#2997)
* d650082 VMLA Dynamic Iota support with Shape dialect work. (#2965)
* c724ee4 Add function to hide SavedModel roundtrip (#2995)
* 2fedce6 Merge pull request #2996
* c5f7030 Merge branch 'main' into google-to-main
* cf3211d [vulkan] Reset TimePointFence status when releasing back to pool (#2905)
* ebc6a83 Add lint action to check for tabs (#2984)
* 932339c Merge pull request #2964 from silvasean/add-dynamic-dot-example
* df727ae Integrate MLIR-EmitC at iml130/mlir-emitc@560cd8c (#2990)
* e824d36 Refactor for explicit dialect registration (#2978)
* 38b7d2c Allow ModelRunner to receive an array of extra symbols available during JITing..
* 264a97d Fuse linalg.tensor_reshape operations with hal.interface* operations. (#2973)
* 0e3c737 Fold flow.tensor.update when all operands are constant (#2982)
* c7a21c2 Merge pull request #2983 from rsuderman/google-to-main
* fd55a86 Add a dynamically shaped mhlo.dot lowering example

COPYBARA_INTEGRATE_REVIEW=#3012 from rsuderman:main-to-google 6282700
PiperOrigin-RevId: 328632208
@silvasean

Copy link
Copy Markdown
Contributor Author

I just used the github UI. Can we configure the repo to "not do merge commits for trivial commits when merging with the github UI"?

@GMNGeoffrey

Copy link
Copy Markdown
Member

I just used the github UI. Can we configure the repo to "not do merge commits for trivial commits when merging with the github UI"?

No 😞 You have to select "squash and merge" or "merge" from the dropdown. We could make all merging happen with a bot that could do smart things...

@silvasean

Copy link
Copy Markdown
Contributor Author

:(

Is there a "github feature request" we can file here? We will want to avoid this trap for npcomp as well.

@ScottTodd

Copy link
Copy Markdown
Member

Doesn't GitHub remember your last used merge method? For most people it should consistently use squash and merge by default (once set). For IREE build cops who need to create merge commits (or people that want merge commits for their big PRs like Ben :P), they have the extra step of remembering which to use when.

@GMNGeoffrey

Copy link
Copy Markdown
Member

:(

Is there a "github feature request" we can file here? We will want to avoid this trap for npcomp as well.

There are various places to put FRs. The official one doesn't get tracked publicly, so there are also public trackers, like https://github.com/isaacs/github.

You can turn merge commits off entirely for the repo, but we need them (mostly for integrates).

But Scott is right that it should remember the last strategy you used.

@silvasean

silvasean commented Aug 27, 2020 •

Copy link
Copy Markdown
Contributor Author

Sorry, just to be clear, "Squash and merge" does or does not create a merge commit? (Scott's description seemed to possibly imply that using it wouldn't create a merge commit).

@GMNGeoffrey

GMNGeoffrey commented Aug 27, 2020 •

Copy link
Copy Markdown
Member

Sorry, just to be clear, "Squash and merge" does or does not create a merge commit? (Scott's description seemed to possibly imply that using it wouldn't create a merge commit).

It does not. So for these sorts of things you should select "squash and merge"

@silvasean

Copy link
Copy Markdown
Contributor Author

Ah, ok. I'll use that in the future. Very confusing that it has "merge" in the name even though it doesn't create a merge commit.

@rsuderman rsuderman mentioned this pull request Aug 27, 2020
copybara-service Bot pushed a commit that referenced this pull request Aug 27, 2020
* aa8d1c0 Enable simple.mlir test for iree-benchmark-module on vulkan (#3016)
* 6db4e7b [vulkan] Release timepoint fences more aggressively when possible (#2800)
* a1365d3 [vulkan] Do not request timeline semaphore if not available (#2904)
* a38c890 Add more type support to model builder matmul benchmark. (#2977)
* a293ca7 Fix hyperlink to getting started docs on python page. (#3015)
* b022e70 Release inputs before closing the session. (#3004)
* f1678df Dynamicly register benchmark for entry_function with name BM_{entry_function} ..
* 6282700 Expand the tf_module_to_compiler_module API (#3009)
* f7e561a Merge pull request #3006 from rsuderman/google-to-main
* 8341d71 Explicitly insert dialects in conversion passes (#3002)
* b7c2b60 Fix format by changing to LLVM style (#3008)
* 4286f17 Merge branch 'main' into google-to-main
* f0a07f6 Allow iree.placeholder as an op between splittable ops. (#2999)
* 6bd3b1d Use hidden visibility for all symbols by default (#2997)
* d650082 VMLA Dynamic Iota support with Shape dialect work. (#2965)
* c724ee4 Add function to hide SavedModel roundtrip (#2995)
* 2fedce6 Merge pull request #2996
* c5f7030 Merge branch 'main' into google-to-main
* cf3211d [vulkan] Reset TimePointFence status when releasing back to pool (#2905)
* ebc6a83 Add lint action to check for tabs (#2984)
* 932339c Merge pull request #2964 from silvasean/add-dynamic-dot-example
* df727ae Integrate MLIR-EmitC at iml130/mlir-emitc@560cd8c (#2990)
* e824d36 Refactor for explicit dialect registration (#2978)
* 38b7d2c Allow ModelRunner to receive an array of extra symbols available during JITing..
* 264a97d Fuse linalg.tensor_reshape operations with hal.interface* operations. (#2973)
* 0e3c737 Fold flow.tensor.update when all operands are constant (#2982)
* c7a21c2 Merge pull request #2983 from rsuderman/google-to-main
* fd55a86 Add a dynamically shaped mhlo.dot lowering example

COPYBARA_INTEGRATE_REVIEW=#3018 from rsuderman:main-to-google 4a9ea02
PiperOrigin-RevId: 328784816
This was referenced Aug 27, 2020
copybara-service Bot pushed a commit that referenced this pull request Aug 27, 2020
* 0c97a1c Merge pull request #3022 from rsuderman/google-to-main
* bf264f4 Merge branch 'main' into google-to-main
* 8524cb9 Split LLVM targets into subfolders to support CMake filtering. (#2960)
* 6e78211 Fixed Emulator Timeline Semaphore parameter name (#3019)
* aa8d1c0 Enable simple.mlir test for iree-benchmark-module on vulkan (#3016)
* 6db4e7b [vulkan] Release timepoint fences more aggressively when possible (#2800)
* a1365d3 [vulkan] Do not request timeline semaphore if not available (#2904)
* a38c890 Add more type support to model builder matmul benchmark. (#2977)
* a293ca7 Fix hyperlink to getting started docs on python page. (#3015)
* b022e70 Release inputs before closing the session. (#3004)
* f1678df Dynamicly register benchmark for entry_function with name BM_{entry_function} ..
* 6282700 Expand the tf_module_to_compiler_module API (#3009)
* f7e561a Merge pull request #3006 from rsuderman/google-to-main
* 8341d71 Explicitly insert dialects in conversion passes (#3002)
* b7c2b60 Fix format by changing to LLVM style (#3008)
* 4286f17 Merge branch 'main' into google-to-main
* f0a07f6 Allow iree.placeholder as an op between splittable ops. (#2999)
* 6bd3b1d Use hidden visibility for all symbols by default (#2997)
* d650082 VMLA Dynamic Iota support with Shape dialect work. (#2965)
* c724ee4 Add function to hide SavedModel roundtrip (#2995)
* 2fedce6 Merge pull request #2996
* c5f7030 Merge branch 'main' into google-to-main
* cf3211d [vulkan] Reset TimePointFence status when releasing back to pool (#2905)
* ebc6a83 Add lint action to check for tabs (#2984)
* 932339c Merge pull request #2964 from silvasean/add-dynamic-dot-example
* df727ae Integrate MLIR-EmitC at iml130/mlir-emitc@560cd8c (#2990)
* e824d36 Refactor for explicit dialect registration (#2978)
* 38b7d2c Allow ModelRunner to receive an array of extra symbols available during JITing..
* 264a97d Fuse linalg.tensor_reshape operations with hal.interface* operations. (#2973)
* 0e3c737 Fold flow.tensor.update when all operands are constant (#2982)
* c7a21c2 Merge pull request #2983 from rsuderman/google-to-main
* fd55a86 Add a dynamically shaped mhlo.dot lowering example

COPYBARA_INTEGRATE_REVIEW=#3025 from rsuderman:main-to-google 0c97a1c
PiperOrigin-RevId: 328804964
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation ✏️ Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants