Skip to content

feat: activation stable abi#1007

Open
drbh wants to merge 7 commits into
mainfrom
stable-abi-activation
Open

feat: activation stable abi#1007
drbh wants to merge 7 commits into
mainfrom
stable-abi-activation

Conversation

@drbh

@drbh drbh commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

this PR adds the stable torch ABI to the activation kernel and also exercises the backend scoped stable abi feature that is implemented in this branch huggingface/kernels#682

drbh added 2 commits June 30, 2026 21:19
Signed-off-by: David Holtz <david.richard.holtz@gmail.com>
@drbh

drbh commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

/kernel-bot build activation

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot build activation
Mode: build only
Target branch: pr-1007
PR head SHA: 55dd09c7d86d3af95802b3d719b563a79f7cb6a3
Workflows: build.yaml, build-mac.yaml, build-windows.yaml

Dispatched (3):

@drbh

drbh commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

/kernel-bot build activation

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot build activation
Mode: build only
Target branch: pr-1007
PR head SHA: 1800440ba7a544b99f0c514f7ab9b1d2e8d54505
Workflows: build.yaml, build-mac.yaml, build-windows.yaml

Dispatched (3):

Comment thread activation/activation/dispatch_utils.h Outdated
Comment on lines +25 to +36
#define VLLM_DISPATCH_FLOATING_TYPES(TYPE, NAME, ...) \
[&] { \
switch (TYPE) { \
VLLM_DISPATCH_CASE_FLOATING_TYPE(Float, float, __VA_ARGS__) \
VLLM_DISPATCH_CASE_FLOATING_TYPE(Half, torch::headeronly::Half, \
__VA_ARGS__) \
VLLM_DISPATCH_CASE_FLOATING_TYPE(BFloat16, torch::headeronly::BFloat16, \
__VA_ARGS__) \
default: \
STD_TORCH_CHECK(false, NAME " not implemented for the given dtype"); \
} \
}()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this removes float8?

We should sync this file against: https://github.com/vllm-project/vllm/blob/main/csrc/libtorch_stable/dispatch_utils.h

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ah yea good point it is much better to sync wth that upstream file, I originally slimmed it down because it wasn't clear to me that fp8 was used.

updated to sync with vllm in latest!

Comment thread activation/build.toml Outdated
]

[torch.stable-abi]
cuda = "2.11"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ROCm/HIP?

Also, is there a reason that 2.9 cannot be targeted?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

rocm was originally left out because this kernel was only targeting cuda and metal, updated to also target rocm in latest.

and I think that the vllm dispatch header requires us to use 2.10 and later because of torch/headeronly/core/Dispatch.h

it seems like that files only exists in 2.10 and later
https://github.com/pytorch/pytorch/blob/v2.10.0/torch/headeronly/core/Dispatch.h
https://github.com/pytorch/pytorch/blob/v2.9.0/torch/headeronly/core/Dispatch.h

I think we can either unsync the dispatch header and target 2.9 or sync with vllm and target 2.10

@drbh

drbh commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

/kernel-bot build activation

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot build activation
Mode: build only
Target branch: pr-1007
PR head SHA: 15fb9c3045a08309ccefd044a82b6044b93e480e
Workflows: build.yaml, build-mac.yaml, build-windows.yaml

Dispatched (3):

@drbh

drbh commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

/kernel-bot build activation

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot build activation
Mode: build only
Target branch: pr-1007
PR head SHA: 99f37ea50de0e27c90d23102f1924bd924acc6d0
Workflows: build.yaml, build-mac.yaml, build-windows.yaml

Dispatched (3):

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