Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable unroll on top of vectorization in pointwise scheduler #3249

Closed
wants to merge 42 commits into from

Conversation

liqiangxl
Copy link
Collaborator

@liqiangxl liqiangxl commented Oct 21, 2024

What's in this PR: Following #3067, enable unroll on top of vectorization in pointwise scheduler
Heuristics:
Unroll increased instruction level parallelism but reduced threads-level paralelism, it is beneficial when
(1) computation latency is close to memory latency
(2) threads-level paralelism is already saturated, e.g. each SM needs to process 8 * 64 warps
when these two conditions are met, unroll increased
Performance:
(0) See doc for other hardwards.

(1) H100 [float16, no change for float32]
(1.1) Gelu Bias [1.05x speedup]
image
image

(1.2) Silu Mul [No change]
image

(1.3) Pointwise Mul [No change]
image

@liqiangxl
Copy link
Collaborator Author

!build --pybench

@liqiangxl
Copy link
Collaborator Author

!build --pybench

@liqiangxl liqiangxl closed this Nov 2, 2024
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