Skip to content

_scaled_dot_product_flash_attention_for_cpu can't be rewrite in ReduceOpVariantsPass. Because of string not pattern. #4108

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

Open
heshuju opened this issue Apr 1, 2025 · 0 comments

Comments

@heshuju
Copy link

heshuju commented Apr 1, 2025

_scaled_dot_product_flash_attention_for_cpu can't be rewrite in ReduceOpVariantsPass.
Because of string not pattern.

"torch.aten._scaled_dot_product_flash_attention_for_cpu",

I found out the reason is:

Modify the code and it will work.

  return createMlirOperationAtEnd(
      appendToBlock, "torch.operator", loc, resultTypes, operands,
      toMlirNamedAttribute(
          "name", mlirStringAttrGet(context, toMlirStringRef(opName))));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant