-
Notifications
You must be signed in to change notification settings - Fork 275
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 FusedLinearCrossEntropy #2485
Conversation
BenchmarkOperator, | ||
register_benchmark, | ||
) | ||
from liger_kernel.transformers.fused_linear_cross_entropy import LigerFusedLinearCrossEntropyLoss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably also need to setup how to install linger_kernel (e.g., adding it as a submodule, or install it in https://github.com/pytorch/benchmark/blob/main/userbenchmark/triton/install.py).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the installation for liger-kernel in
9580b0f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, we need to skip this operator until the pinned transformers version bump . because liger-kernel https://github.com/linkedin/Liger-Kernel/blob/main/pyproject.toml#L23 requires "transformers>=4.44.2".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping transformer version in #2488
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The transformer version has been updated, can you help rebase this PR on the trunk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Is liger_kernel only available in OSS but not fbcode? If so, we probably need to manually bypass the internal CI. |
@FindHao has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
f825c85
to
e38021f
Compare
@FindHao has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@FindHao has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
As discussed in pytorch/pytorch#136168, I'm going to migrate implementations of operator benchmarking. This PR adds different implementations for FusedLinearCrossEntropy as a starting example.
Execution command:
Example output: