## Summary
Bump the single shared project version from 0.8.3 to 0.8.4. Both Python
and native package setup scripts derive their versions from this field,
and the LCK release workflow compares it with the release tag.
This fixes the version mismatch observed in release run 36758816145 and
prevents the Python release workflow from building another 0.8.3 wheel.
No kernel or workflow changes are included.
## Validation
Both the root and native `setup.py --version` entrypoints report
`0.8.4`.
## Release sequencing
Publish from the corrected commit after merge. Merely rerunning the old
release event without correcting its source reference will still build
version 0.8.3. The separately identified Python-wheel `ops.experimental`
packaging issue also remains to be repaired before shipping a usable
wheel.
Co-authored-by: kolehma8 <[email protected]>
Co-authored-by: Copilot <[email protected]>
## Summary
Fixes#1302.
`pyproject.toml` has no `requires-python`, so pip resolves and installs
liger-kernel on any interpreter. Users on unsupported Pythons get
runtime failures instead of a clean "requires Python >= X" resolver
message.
This adds `requires-python = ">=3.10"`, matching the project's own
floor: every CI test workflow (nvi-ci, amd-ci, checkstyle, benchmark)
and the release-publish workflow run Python 3.10.
Picking up the hand-off from #1307 (closed by its author due to
inactivity, fix noted as still valid).
## Testing Done
Metadata-only change. Verified the line parses and the floor matches CI:
```
$ python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['requires-python'])"
>=3.10
```
Co-authored-by: yashb98 <[email protected]>
Co-authored-by: Vaibhav Jindal <[email protected]>
## Summary
- bump the shared public version from `0.8.2` to `0.8.3`
- update both `liger-kernel` and `liger-cute-kernels`, since the native
package resolves its version from the root `pyproject.toml`
- add `liger-kernel[lck]` as an optional install path
- pin the extra to `liger-cute-kernels==0.8.3` so the Python and native
distributions cannot drift across releases
- document stable and editable `lck` extra installation
## Resulting installs
```bash
pip install liger-kernel
pip install "liger-kernel[lck]"
```
The second command installs the normal Liger dependencies plus the
exactly matching standalone native wheel.
## Validation
- root wheel: `liger_kernel-0.8.3-py3-none-any.whl`
- root wheel metadata includes `Provides-Extra: lck`
- root wheel metadata includes `liger-cute-kernels==0.8.3; extra ==
"lck"`
- standalone LCK package metadata resolves to `0.8.3`
- targeted LCK version tests pass
- Ruff check and format checks pass for `setup.py`
---------
Co-authored-by: jkolehma <[email protected]>
Co-authored-by: Copilot <[email protected]>
## Summary
Update `pyproject.toml` to set the package version to `0.8.2` for
release.
## Testing Done
Not run (version-only metadata change).
- Hardware Type: N/A
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
Co-authored-by: jkolehma <[email protected]>
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
Update pyproject.toml for v0.8.1 release
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
## Summary
`pytest-cov` was forced on for every pytest invocation via `addopts` in
`pyproject.toml`, dumping a full per-file coverage table (~190 lines) to
the terminal on every `make test` and `make test-convergence` run (and
any ad-hoc `pytest` invocation), regardless of whether coverage was
wanted. This bloated CI/local logs significantly.
- Remove `--cov*` flags from `[tool.pytest.ini_options] addopts` in
`pyproject.toml` so coverage is no longer collected/printed by default.
- Remove the redundant `--cov` flags from the Makefile `test` target.
- Add a new opt-in `test-verbose` Makefile target (renamed from an
earlier `test-cov`) that runs the same correctness tests with both
coverage reporting (`term-missing` + `html`) and a full `--durations=0`
test-duration breakdown, for anyone who explicitly wants that diagnostic
output.
- Remove `--durations=0` from `[tool.pytest.ini_options] addopts` — this
was forcing every test's duration (slowest-first) to print on every run,
adding a large, mostly-noisy timing block to every `make test`/`make
test-convergence` run. Anyone who wants timing info can still pass
`--durations=N` (or `--durations=0` for all) manually.
### Follow-up: tightened `poly_norm` bf16 gradient tolerance
Also includes a small follow-up from review on #1309: the bf16 `atol`
used for `test_poly_norm.py::test_correctness`'s
`weight.grad`/`bias.grad` checks was loosened to `1.0`, which was
flagged as unnecessarily risky. The largest mismatch actually observed
(catastrophic cancellation in a large `sum()` reduction over up to ~524k
near-canceling terms, differing reduction order between Triton and
PyTorch — see #1309 for full root cause) was `2.25` at a value of
`~34.5`. `atol=0.5` (tolerance `2.225`) fails just under that;
`atol=0.6` (tolerance `2.325`) gives a small, deliberate margin and
passed 5/5 repeated local runs. Tightened from `1.0 → 0.6`.
## Testing Done
1. Verified plain `pytest` / `make test` / `make test-convergence` no
longer print coverage tables.
2. Verified `make test-cov` (opt-in) still produces the full coverage
report as before.
3. Ran `test_poly_norm.py::test_correctness[dtype1-...]` (bf16) 5x with
`atol=0.6` — all passed. Ran the full `test_poly_norm.py` +
`test_fused_add_rms_norm.py` suites 3x — consistently `55 passed, 2
xfailed`.
- Hardware Type: H100
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
---------
Co-authored-by: Copilot <[email protected]>
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
Upgrade version for release
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
NA
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
Update pyproject.toml for v0.7.0 release.
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
N/A
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
Co-authored-by: Vaibhav Jindal <[email protected]>
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
New version release v0.6.5!
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
1. Recent PR (https://github.com/linkedin/Liger-Kernel/pull/876) added
functionality to run tests in parallel. However, this leads to GPU OOM
errors breaking the CI. Even commands like
`pytest test/transformers/test_tvd.py` are not working on a single GPU
setup because of parallelism. This PR fixes this issue by changing the
behavior to run tests sequentially.
2. Fixes flaky tests for bf16 for glm4v models by increasing tolerance.
3. Use H100 for nvidia tests.
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
---------
Co-authored-by: Steven Shimizu <[email protected]>
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
This PR adds [pytest-cov](https://pypi.org/project/pytest-cov/) which
helps measure test coverage and can help improve overall test coverage/
diagnose test which are slow or failing. Also, I've added
[pytest-asyncio](https://pypi.org/project/pytest-asyncio/) which was
being used in pyproject.toml, but was not added as a dev dependency.
Could you please review?
cc: @lancerts , @shimizust
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
Update pyproject.toml version to 0.6.2 for new release.
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
- Releasing minor version bump 0.6.0 primarily to indicate
backwards-incompatible support for monkey patching latest transformers
(>=4.52.0) VLM models
## Testing Done
- Hardware Type: A10G
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
Co-authored-by: Shivam Sahni <[email protected]>
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
Closes https://github.com/linkedin/Liger-Kernel/issues/451
This PR implements dynamic dependency management that automatically
detects the user's hardware platform (CUDA, ROCm, or CPU) and installs
the appropriate dependencies. This ensures a smoother installation
experience across different hardware configurations.
### Key Changes
- Added `_get_platform()` function to detect hardware platform using
`nvidia-smi` or `rocm-smi`
- Implemented `get_default_dependencies()` to return platform-specific
core dependencies
- Implemented `get_optional_dependencies()` to handle dev and
transformers extras
- Updated `pyproject.toml` to use dynamic dependencies from setup.py
### Platform-specific Dependencies
- **CUDA/CPU**:
- Core: torch>=2.1.2, triton>=2.3.1
- Full dev environment including transformers, testing tools, and
visualization libraries
- **ROCm**:
- Core: torch>=2.6.0.dev, triton>=3.0.0, plus ROCm-specific requirements
- Streamlined dev dependencies focused on essential tools
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
### setup.py vs pyproject.toml
#### setup.py
- Traditional Python package configuration
- Allows dynamic configuration via Python code
- Needed for complex/conditional dependencies
- Supports custom build steps
#### pyproject.toml
- Modern, static configuration (PEP 517/518)
- Cleaner, declarative format
- Works well with modern tools (poetry, hatch)
- Preferred for simple packages
#### Using Both
- `pyproject.toml`: Build system specs, basic metadata
- `setup.py`: Dynamic dependencies, custom build logic
- Common in projects needing both static config and dynamic install
-
## Testing Done (In Progress)
<!--- This is a required section; please describe how this change was
tested. --->
1. Clone the repository
2. Test installation on different platforms:
```bash
# Basic installation
pip install -e .
# With dev tools
pip install -e .[dev]
# With transformers
pip install -e .[dev,transformers]
```
- [x] CPU
- [x] CUDA - NVIDIA
Tested with following config
- NVIDIA-SMI 535.129.03
- Driver Version: 535.129.03
- CUDA Version: 12.2
- [ ] ROCm - AMD
- Need help from the community to test on ROCm platform
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
## Hardware Type:
- NVIDIA-SMI 535.129.03
- CUDA Version: 12.2
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
---------
Co-authored-by: ByronHsu <[email protected]>
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
To fix https://github.com/linkedin/Liger-Kernel/issues/458
1. Move orpo trainer to trainer/
2. Remove trl from `[dev]` now so the test represents the actual user
environment.
3. Disable Qwen VL test for transformers>=4.47.0 for now and create
issue https://github.com/linkedin/Liger-Kernel/issues/461
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
This is to clean up the `amd-ci.yml` setup steps.
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
---------
Co-authored-by: tjtanaa <[email protected]>
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
This PR adds support for the following:
1. LigerORPOTrainer: a wrapper on top of [HuggingFace ORPO
Trainer](https://github.com/huggingface/trl/blob/main/trl/trainer/orpo_trainer.py)
to use LigerORPOLoss module.
2. We also provide an example for using LigerORPOTrainer in
`examples/alignment/run_orpo.py`
3. Change FusedLinearPreference base class' forward function to return
additional metrics to align our implementation with HF ORPO Trainer
4. Additional refactor to avoid torch compile recompilations --
accumulate_chunk function now calls accumulate_helper which is torch
compiled solely and input_chunk/target_chunk/target dimension 1 (seq
len) is explicitly marked as dynamic to avoid recompilations
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
Add monkeypatch to support [Llama
3.2-Vision](https://github.com/huggingface/transformers/pull/33703/files#diff-d804e851851cdebeb8048938f1f8beec1cfa78bf7b1f06af86faa450f9d18def)
models.
## Details
Llama 3.2-Vision is a multimodal model. It is also only available in
transformers>=4.45.0.
Torchvision is required to run the multimodal tests for Llama 3.2-Vision
(the image processor requires it).
## Testing Done
- Hardware Type: RTX 4090
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
---------
Co-authored-by: Shao Tang <[email protected]>
Co-authored-by: Steven Shimizu <[email protected]>
Co-authored-by: shivam15s <[email protected]>
## Summary
- Make the `transformers` dependency optional so we only have `torch`
and `triton` as required deps, which is helpful if you're not using
`transformers` for modeling code. This was also causing installation
issues for people using slightly older transformers versions.
- If transformers is needed, make it compatible with any 4.x version.
The specific model being used should dictate the transformers version
compatibility.
## Testing Done
`pip install -e .[transformers]`
`pip install -e .[dev]`
A100-80G-PCIe
- Hardware Type: A100-80G-PCIe
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
Release Liger-Kernel version 0.3.0
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
## Summary
In https://github.com/linkedin/Liger-Kernel/pull/218, I fixed the
`tool.setuptools.packages.find` field and tested it only in editable
mode with `pip install -e .`. However, in production mode with `pip
install .`, only the env_report.py file is copied to the Python
site-packages directory. To fix this, adding "liger_kernel.*" to the
include list will ensure that setuptools correctly includes all
subpackages within liger_kernel.
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence
---------
Co-authored-by: Byron Hsu <[email protected]>
## Summary
Fix `tool.setuptools.packages.find` field in pyproject.toml. Otherwise
in local build mode with `pip install .`, python system fails to locate
liger_kernel.
Co-authored-by: Byron Hsu <[email protected]>
## Summary
- Refactored kernel benchmarking tests to save data to a single CSV
(`benchmark/data/all_benchmark_data.csv`) that contains more complete
information on how the benchmarking test was setup:
```
kernel_name (e.g. swiglu)
kernel_provider (e.g. liger or huggingface)
kernel_operation_mode (e.g. full, forward, backward)
metric_name (e.g. speed, memory)
metric_unit (e.g. MB)
x_name
x_label (e.g. hidden size)
x_value
y_value_50 (median)
y_value_20 (20th percentile)
y_value_80 (80th percnetile)
extra_benchmark_config_str (e.g. {""B"": 32, ""T"": 512, ""D"": 768, ""dtype"": ""torch.float32""})
gpu_name (e.g. NVIDIA A100-SXM4-80GB)
timestamp
liger_version (e.g. 0.2.1)
```
- Removed existing image files to not clutter up the git history per
previous discussion (https://github.com/linkedin/Liger-Kernel/pull/54)
- Added sample jupyter notebook that can be used to filter and plot the
benchmark data
- Added makefile command to run all benchmarks: `make run-benchmarks`
- Don't overwrite existing data by default if same benchmark. Same
benchmark means same kernel_name, kernel_provider,
kernel_operation_mode, metric_name, x_label, gpu_name, and
extra_benchmark_config_str
## Testing Done
- Ran all benchmarks and spot-checked values with existing benchmark
data

- Hardware Type: A100
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
added pyproject.toml
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->
## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->
ran `pip install -e .` and it built successfully
<!--
Replace BLANK with your device type. For example, A100-80G-PCIe
Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them.
-->
- Hardware Type: RTX 3090
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence