pytorch-labs / tritonbench

Tritonbench is a collection of PyTorch custom operators with example inputs to measure their performance.
BSD 3-Clause "New" or "Revised" License
21 stars 3 forks source link

Add kl_div, swiglu #26

Closed FindHao closed 3 weeks ago

FindHao commented 3 weeks ago

Cloned from PR https://github.com/pytorch-labs/tritonbench/pull/14 because of merging bot issue Add kl_div and swiglu from liger kernel

Test Plan:

% python run.py --op kl_div,swiglu --num-inputs 1
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:07<00:00,  7.61s/it]
  x_val    torch_kl_div-latency    liger_kl_div-latency    inductor_kl_div-latency
-------  ----------------------  ----------------------  -------------------------
      0                0.363712                0.099168                   0.108448
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00,  1.37s/it]
  x_val    torch_swiglu-latency    liger_swiglu-latency    inductor_swiglu-latency
-------  ----------------------  ----------------------  -------------------------
      0                 3.10813                  3.3007                    3.35165
facebook-github-bot commented 3 weeks ago

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

facebook-github-bot commented 3 weeks ago

@FindHao merged this pull request in pytorch-labs/tritonbench@550ca73914c4a4807e856bbaa15c670df058d11e.