Skip to content

[feat] fix some numel and refactor torch binding#4867

Closed
FlamingoPg wants to merge 7 commits intosgl-project:mainfrom
FlamingoPg:cmake_sample
Closed

[feat] fix some numel and refactor torch binding#4867
FlamingoPg wants to merge 7 commits intosgl-project:mainfrom
FlamingoPg:cmake_sample

Conversation

@FlamingoPg
Copy link
Copy Markdown
Collaborator

Motivation

fix some numel and refactor torch binding

Modifications

Checklist

@FlamingoPg
Copy link
Copy Markdown
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 HaiShaw and Ying1123 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
Comment thread .gitmodules
@@ -4,9 +4,9 @@
[submodule "sgl-kernel/3rdparty/cccl"]
Copy link
Copy Markdown
Collaborator

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.

Comment thread sgl-kernel/CMakeLists.txt
GIT_REPOSITORY https://github.com/flashinfer-ai/flashinfer
GIT_TAG 79fd1ae90d9b8098ca70dec6071da96f3f6da7b9
GIT_REPOSITORY https://github.com/sgl-project/flashinfer
GIT_TAG 2b9f16eb79bd344e31725e8d7a92fe7fe980ffdf
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please use branch instead.

/*
* From csrc/allreduce
*/
m.def(
Copy link
Copy Markdown
Collaborator

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