Skip to content

liger-kernels: Add layer repos for remaining functions#995

Merged
vasqu merged 3 commits into
mainfrom
adjust-liger-to-all-layers
Jul 14, 2026
Merged

liger-kernels: Add layer repos for remaining functions#995
vasqu merged 3 commits into
mainfrom
adjust-liger-to-all-layers

Conversation

@vasqu

@vasqu vasqu commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

As per title, adds layer type versions for the functions

LigerForCausalLMLoss.can_torch_compile = True


class liger_rotary_pos_emb_layer(nn.Module):

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.

added layer suffices as it would clash with the original fns otherwise and we should keep BC imo

@drbh drbh added backend: cuda NVIDIA CUDA kernels backend: rocm AMD / AITER kernels backend: triton Vendor-neutral Triton kernels backend: xpu Intel XPU kernels new-layer Adds or extends a LayerRepo size: M Diff <= 250 lines type: feature New functionality / capability cuda NVIDIA CUDA kernels feature New functionality / capability rocm AMD / AITER kernels triton Vendor-neutral Triton kernels and removed backend: triton Vendor-neutral Triton kernels backend: xpu Intel XPU kernels backend: cuda NVIDIA CUDA kernels backend: rocm AMD / AITER kernels size: M Diff <= 250 lines type: feature New functionality / capability cuda NVIDIA CUDA kernels rocm AMD / AITER kernels labels Jun 30, 2026
# NOTE: We have this intentional graph break as we encounter issues such as IMAs and Cublas errors.
# We know that this is an optimized kernel already so there is less ways to
# fuse it either way; we rely on torch compile to go through the base model to optimize.
@torch.compiler.disable

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.

Where does it fail?

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.

It would need a proper fake wrapping but we already do the same for the function. I would really like to move this to a separate PR / fix this upstream in liger kernels directly

@drbh

drbh commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

/kernel-bot build liger-kernels

drbh
drbh previously approved these changes Jul 13, 2026

@drbh drbh left a comment

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.

lgtm

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot build liger-kernels
Mode: build only
Target branch: pr-995
PR head SHA: 7246c3fc8ae8e05fc6a577d2e37ec9cfdea1a3fd
Workflows: build.yaml, build-mac.yaml, build-windows.yaml

Dispatched (1):

@vasqu
vasqu merged commit 4d9f798 into main Jul 14, 2026
4 of 5 checks passed
@vasqu

vasqu commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

/kernel-bot merge-and-upload liger-kernels

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Build request processed.

Command: /kernel-bot merge-and-upload liger-kernels
Mode: merge, build and upload
Target branch: ``
PR head SHA: b591535e02357686c2d1e00f9b4978c1045908e7
Workflows: `build.yaml, build-mac.yaml, build-windows.yaml`

Merge result: PR is already merged. Continuing with build/upload.

Dispatched (1):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New functionality / capability new-layer Adds or extends a LayerRepo triton Vendor-neutral Triton kernels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants