mlir: add gpu_block and gpu_thread primitive#100
Draft
yadej wants to merge 5 commits into
Draft
Conversation
- Usage of TileForAll with gpu mapping - Fusion of gpu mapping for correct IR
And fix some primitive and type problem
…dify some test Fix annotation the same with gpu_block
This file contains hidden or 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
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.
Motivation
The current version of appointing gpu block id or thread id is not very good.
So to be more flexible we should be able to choose what GPU block or thread dimension we want a loop to be.
Description
Add 2 primitives gpu_block and gpu_thread to the scheduler.
Each primitive accept at most a list of 3 elements each mapped to a certain dimension.
It works with memref and tensor. Also should work with descript
Only works on CUDA cores
Limitation
Currently we can only map gpu_block and gpu_thread map on the same dimension since we depend of the size of gpu_block to determine the number of thread of gpu_thread.
TODO: