Skip to content

Remove quantized_utils.cuh - #3237

Merged
zcbenz merged 1 commit into
ml-explore:mainfrom
zcbenz:one-less-utils-h
Mar 11, 2026
Merged

zcbenz merged 1 commit into
ml-explore:mainfrom
zcbenz:one-less-utils-h

Conversation

@zcbenz

@zcbenz zcbenz commented Mar 10, 2026

Copy link
Copy Markdown
Member

We no longer really need a quantized_utils.cuh after removing the __nv_fp8 classes in #3212:

  • Move get_pack_factor/get_bytes_per_pack to backend/common/quantized.h: share the code between CPU and CUDA backends.
  • Move dispatch_groups/dispatch_bits to quantized/affine_quantize.cu: there are several QMM kernels in CUDA backend optimized for different quantizations so each kernel has their own version of dispatch_groups.
  • Move absmax_x2 to quantized/fp_quantize.cu: it is only used there.

@nastya236
nastya236 self-requested a review March 10, 2026 10:46
@nastya236

Copy link
Copy Markdown
Collaborator

Looks great, thank you for doing this! It makes a lot of sense to move dispatch to a file related to affine quantization.

@zcbenz
zcbenz merged commit 1c2d704 into ml-explore:main Mar 11, 2026
16 checks passed
@zcbenz
zcbenz deleted the one-less-utils-h branch March 11, 2026 10:45
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.

2 participants