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

Update implementation of scaled_index_add and index_select_cat #195

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qasfb
Copy link
Contributor

@qasfb qasfb commented Sep 1, 2023

Add a check for the proper size and type for the optimized scaled_index_add and index_select_cat, and fallback on pytorch implementation otherwise

…allback

Add a check for the proper size and type for the optimized scaled_index_add and index_select_cat, and fallback on pytorch implementation otherwise
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 1, 2023
@qasfb qasfb marked this pull request as draft September 1, 2023 13:09
@qasfb qasfb mentioned this pull request Sep 1, 2023
@schmidt-ai
Copy link

@qasfb thanks for this. Are you planning to take this PR out of draft mode and have it reviewed/merged? Would be nice to see this land.

@@ -27,8 +27,26 @@
XFORMERS_ENABLED = os.environ.get("XFORMERS_DISABLED") is None
try:
if XFORMERS_ENABLED:
from xformers.ops import fmha, scaled_index_add, index_select_cat

from xformers.ops import scaled_index_add as _scaled_index_add, index_select_cat as _index_select_cat

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from xformers.ops import scaled_index_add as _scaled_index_add, index_select_cat as _index_select_cat
from xformers.ops import fmha, scaled_index_add as _scaled_index_add, index_select_cat as _index_select_cat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants