Skip to content

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

@heshuju

Description

@heshuju

_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))));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions