Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom ops cross_entropy and geglu #2507

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

FindHao
Copy link
Member

@FindHao FindHao commented Oct 14, 2024

Add two more custom ops from liger kernel.
Test Plan:

% python run_benchmark.py triton --op cross_entropy --num-inputs 1 --fwd_bwd
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:03<00:00,  3.27s/it]
  x_val    CrossEntropyLoss-latency    LigerCrossEntropyLoss-latency    InductorCrossEntropyLoss-latency
-------  --------------------------  -------------------------------  ----------------------------------
      0                     2.76342                         0.806368                            0.475168
% python run_benchmark.py triton --op geglu  --num-inputs 1
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:02<00:00,  2.68s/it]
  x_val    LlamaMLP-latency    LigerGEGLUMLP-latency    InductorLlamaMLP-latency
-------  ------------------  -----------------------  --------------------------
      0             68.2005                   67.695                     67.6715

@facebook-github-bot
Copy link
Contributor

@FindHao has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@FindHao has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@FindHao has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

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

Successfully merging this pull request may close these issues.

2 participants