Skip to content

mlir: add gpu_block and gpu_thread, gpu_lane, gpu_warp primitive - #100

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

mlir: add gpu_block and gpu_thread, gpu_lane, gpu_warp primitive#100
yadej wants to merge 6 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

@yadej
yadej force-pushed the dev/rcesista/add-gpu-primitive branch from 93e70a1 to e549085 Compare July 27, 2026 08:08
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

@yadej
yadej force-pushed the dev/rcesista/add-gpu-primitive branch from e549085 to b914e5f Compare August 4, 2026 07:59
@yadej yadej changed the title mlir: add gpu_block and gpu_thread primitive mlir: add gpu_block and gpu_thread, gpu_lane, gpu_warp primitive Aug 4, 2026
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