-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Adding cuda kernel (optimized for sm80) for block-wise 4b quantized float 16 GEMM. #18619
Merged
Conversation
This file contains 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
snnn
reviewed
Nov 30, 2023
snnn
reviewed
Nov 30, 2023
yufenglee
reviewed
Jan 8, 2024
onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80_testcu.cu
Show resolved
Hide resolved
yufenglee
reviewed
Jan 8, 2024
onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80_testcu.cu
Show resolved
Hide resolved
yufenglee
reviewed
Jan 9, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/device/quantb_gemm.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Jan 9, 2024
yufenglee
reviewed
Jan 9, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/device/quantb_gemm.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Feb 8, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/kernel/quantb_gemm.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Feb 8, 2024
yufenglee
reviewed
Feb 8, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_meta_mma_tensor_op_tile_iterator.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Feb 8, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_meta_mma_tensor_op_tile_iterator.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Feb 12, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_mma_tensor_op.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Feb 15, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_meta_mma_tensor_op_tile_iterator.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Feb 16, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_meta_mma_tensor_op_tile_iterator.h
Show resolved
Hide resolved
yufenglee
reviewed
Feb 16, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_meta_mma_tensor_op_tile_iterator.h
Show resolved
Hide resolved
yufenglee
reviewed
Feb 20, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_mma_tensor_op.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Feb 20, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_mma_tensor_op.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Feb 20, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_meta_mma_tensor_op_tile_iterator.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Feb 20, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_meta_mma_tensor_op_tile_iterator.h
Outdated
Show resolved
Hide resolved
yufenglee
reviewed
Feb 20, 2024
onnxruntime/core/mickey/cutlass_ext/q4gemm/warp/quantb_meta_mma_tensor_op_tile_iterator.h
Outdated
Show resolved
Hide resolved
yufenglee
approved these changes
Mar 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zz002
pushed a commit
to zz002/onnxruntime
that referenced
this pull request
Mar 7, 2024
…loat 16 GEMM. (microsoft#18619) ### Description Adding CUDA kernel for block-wise 4b quantized float 16 GEMM, this is specially optimized for Nvidia Ampere GPUs. ### Motivation and Context Trying to improve quantized LLM inference performance on Nvidia Ampere GPUs ### Note: This is implemented by extending CUTLASS, so it has a hard dependency on CUTLASS. However, in current build system, loading of CUTLASS dependency is guarded with: (onnxruntime_USE_FLASH_ATTENTION OR onnxruntime_USE_MEMORY_EFFICIENT_ATTENTION) If both of these options are turned off, then compilation will fail. Why CUTLASS dependency is guarded at all? It's a header file only library that does not introduce any binary if not instantiated. What's the downside of removing all the guards and just include CUTLASS unconditionally?
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.
Description
Adding CUDA kernel for block-wise 4b quantized float 16 GEMM, this is specially optimized for Nvidia Ampere GPUs.
Motivation and Context
Trying to improve quantized LLM inference performance on Nvidia Ampere GPUs
Note:
This is implemented by extending CUTLASS, so it has a hard dependency on CUTLASS. However, in current build system, loading of CUTLASS dependency is guarded with:
(onnxruntime_USE_FLASH_ATTENTION OR onnxruntime_USE_MEMORY_EFFICIENT_ATTENTION)
If both of these options are turned off, then compilation will fail.
Why CUTLASS dependency is guarded at all? It's a header file only library that does not introduce any binary if not instantiated. What's the downside of removing all the guards and just include CUTLASS unconditionally?