Skip to content

mlir: add gpu_block and gpu_thread primitive#100

Draft
yadej wants to merge 5 commits into
xtc-tools:mainfrom
yadej:dev/rcesista/add-gpu-primitive
Draft

mlir: add gpu_block and gpu_thread primitive#100
yadej wants to merge 5 commits into
xtc-tools:mainfrom
yadej:dev/rcesista/add-gpu-primitive

Conversation

@yadej

@yadej yadej commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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:

  • Find a way to be able to determine the number of thread of gpu_thread without depending on gpu_block
  • Check what are the limitation with splitting
  • Add shared memory (Probably another PR)
  • Make it work with tensor cores

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.

1 participant