Skip to content

Conversation

@lihaoyang-amd
Copy link

@lihaoyang-amd lihaoyang-amd commented Jun 13, 2025

  1. Support Q6
  2. Optimize the conversion of pack_add, etc., the conversion address appears redundant, using union is more concise and safe;
    code:
  nv_bfloat162* tA = reinterpret_cast<nv_bfloat162*>(&a);
  nv_bfloat162* tB = reinterpret_cast<nv_bfloat162*>(&b);
  nv_bfloat162 tR = __hmax2(*tA, *tB);
  return *(reinterpret_cast<int*>(&tR));
->
  bf162_int_union A, B, R;
  A.i = a;
  B.i = b;
  R.bf2 = __hmax2(A.bf2, B.bf2);
  return R.i;
  1. cast float function overloading; we do not need to consider expanding; overloading to achieve a more concise, no template overhead, compilation will be faster!
    code:
__quickreduce_device_inline__ float T2float_cast(half a) {
  return __half2float(a);
}

__quickreduce_device_inline__ float T2float_cast(nv_bfloat16 a) {
  return __bfloat162float(a);
}
  1. Removed some unneeded functions
T2uchar_cast
T2int_cast
group_max_min

Signed-off-by: Haoyang Li <[email protected]>
@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@lihaoyang-amd lihaoyang-amd marked this pull request as ready for review June 13, 2025 16:22
Signed-off-by: Haoyang Li <[email protected]>
Signed-off-by: Haoyang Li <[email protected]>
Signed-off-by: Haoyang Li <[email protected]>
@ilmarkov ilmarkov merged commit 06af4d3 into neuralmagic:experimental/quick_reduce Jun 16, 2025
2 checks passed
@lihaoyang-amd lihaoyang-amd deleted the lhy/add_Q6 branch June 30, 2025 09:41
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