Skip to content

Conversation

FlamingoPg
Copy link
Collaborator

Motivation

fix some numel and refactor torch binding

Modifications

Checklist

@FlamingoPg
Copy link
Collaborator Author

FlamingoPg commented Mar 28, 2025

This PR do three things

  1. Refactor torch binding,

from:

m.def("all_reduce(int fa, Tensor inp, Tensor! out) -> ()");
m.impl("all_reduce", torch::kCUDA, &all_reduce);

to:

m.def("all_reduce", all_reduce);

simplify the kernel define logic

  1. fix tests/test_sampling.py

  2. update sgl-kernel readme

@zhyncs zhyncs requested review from Ying1123 and HaiShaw as code owners March 28, 2025 20:05
@zhyncs zhyncs closed this Mar 28, 2025
@zhyncs zhyncs mentioned this pull request Mar 28, 2025
6 tasks
@@ -4,9 +4,9 @@
[submodule "sgl-kernel/3rdparty/cccl"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer need to update git modules because we have switched to CMake.

GIT_REPOSITORY https://github.com/flashinfer-ai/flashinfer
GIT_TAG 79fd1ae90d9b8098ca70dec6071da96f3f6da7b9
GIT_REPOSITORY https://github.com/sgl-project/flashinfer
GIT_TAG 2b9f16eb79bd344e31725e8d7a92fe7fe980ffdf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use branch instead.

@@ -22,181 +22,67 @@ TORCH_LIBRARY_EXPAND(sgl_kernel, m) {
/*
* From csrc/allreduce
*/
m.def(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this first in #4871 to unblock the new release

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