Skip to content

Create cooperative matrix performance test - #2443

Merged
ThomasRaoux merged 1 commit into
iree-org:mainfrom
ThomasRaoux:MatMulBenchmark
Jul 10, 2020
Merged

ThomasRaoux merged 1 commit into
iree-org:mainfrom
ThomasRaoux:MatMulBenchmark

Conversation

@ThomasRaoux

Copy link
Copy Markdown
Contributor
  • Refactor the performance testing for cooperative matrix and move it to
    be ran on its own.
  • expand the code to loop through different tiling size
    to be able to find optimal size.
  • Add a mode to check correctness against CPU calculation with smaller
    matrices.
  • Enable cooperative matrix pattern by default as it is now gatted by
    cooperative matrix analysis.
  • Change the signature createAddVulkanLaunchWrapperPass to give
    better control to the model builder tests.

@ThomasRaoux
ThomasRaoux force-pushed the MatMulBenchmark branch 6 times, most recently from e9df6bc to 072b5ee Compare July 9, 2020 05:39
static llvm::cl::opt<bool> correctness(
"correctness",
llvm::cl::desc(
"Compare the result to value calclated on CPU. We will use a smaller "

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.

typo: calclated

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.

Done.

n = 256;
k = 256;
}
printf("tileM=%i tileN=%i tileK=%i\n", tileM, tileN, tileK);

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.

Might worth to also print out m, n, k once at the very beginning.

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.

Done.

pm.addPass(
mlir::createAddVulkanLaunchWrapperPass({width, height, 1}, args));
int numWorkgroupX =
vWorkgroupSizes.empty() ? 1 : width / vWorkgroupSizes[0];

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.

Don't we need to accommodate for the irregular cases by adding one workgroup? Are we assuming always 2^N here?

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.

True, I think it works without it since we insert a loop anyway but I changed it as it is better this way.

* Refactor the performance testing for cooperative matrix and move it to
be ran on its own.
* expand the code to loop through different tiling size
to be able to find optimal size.
* Add a mode to check correctness against CPU calculation with smaller
matrices.
* Enable cooperative matrix pattern by default as it is now gatted by
cooperative matrix analysis.
* Change the signature createAddVulkanLaunchWrapperPass to give
better control to the model builder tests.
@ThomasRaoux
ThomasRaoux merged commit ce6c171 into iree-org:main Jul 10, 2020
@ThomasRaoux
ThomasRaoux deleted the MatMulBenchmark branch July 10, 2020 22:01
This was referenced Jul 13, 2020
copybara-service Bot pushed a commit that referenced this pull request Jul 14, 2020
* f4f2fec Update Bazel version in docs workflow (#2511)
* 19e6574 Add lint action for PR title length (#2481)
* 57a9ae3 Moved CompiledModule and BackendInfo to `tf_utils.py` (#2509)
* 7d50357 Update Bazel to 3.3.1 (#2496)
* afa7d8e [ModelBuilder] Fix leak when using llvm::createLowerMatrixIntrinsicsPass (#2499)
* 90ffb71 [ci] Enable build tests for Android cross compilation (#2507)
* 62490cb Add Bazel 3.3.1 to docker images (#2497)
* 028a883 [ci] Run cmake --build twice to temporary fix the flaky build (#2501)
* 8096658 Start creating $async functions as part of public ABI generation. (#2411)
* 27a1f3d Removed gather lowering test (#2503)
* 02cc1e3 Merge google -> main (#2505)
* 6706f3d Add GitHub action to create PRs merging google -> main (#2482)
* 645a88b Add buildifier lint action (#2243)
* fc812fe Support iree-run-mlir to read input values from a file. (#2352)
* 8078fc6 Use iree_py_binary in keras test binaries (#2488)
* 9f22404 Treat warnings as errors and silence them in third party code (#2489)
* cb000c7 Avoid unused result warning (#2469)
* b06a482 Fix some minor typos (#2486)
* ce6c171 Create cooperative matrix performance test (#2443)
* 0880ee9 Add android build badge to README (#2473)
* 8e14d1f [vulkan] Guard against 0-byte buffer allocation (#2467)
* ef019df Improve TF submodule bump action descriptions (#2471)
* c53ad00 Refactors tf_test_utils, creating tf_utils and simplifying module specificatio..
* a90df48 Merge google -> main (#2468)

PiperOrigin-RevId: 321174064
@copybara-service copybara-service Bot mentioned this pull request Jul 14, 2020
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.

3 participants