Skip to content

Improve custom ops aliasing error message #134278

@zou3519

Description

@zou3519

"Tensors returned from custom ops (1) must not be inputs to the custom op and (2) may not alias any inputs or other returns. Please clone the the offending output tensors (e.g. output.clone()) or refactor your code. Offending op: flash_attn_bwd "

Someone interpreted this to mean that an output of a custom op cannot be an input to another custom op, which is not what I meant when I wrote this.

cc @ezyang @chauhang @penguinwu @bdhirsh

Metadata

Metadata

Assignees

Labels

module: custom-operatorscustom operators, custom ops, custom-operators, custom-opsmodule: pt2-dispatcherPT2 dispatcher-related issues (e.g., aotdispatch, functionalization, faketensor, custom-op,oncall: pt2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions