We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
custom_op
1 parent 22e943c commit 25ce595Copy full SHA for 25ce595
thunder/torch/custom_op.py
@@ -336,6 +336,11 @@ def _register_custom_op(custom_op: CustomOpDef) -> Symbol:
336
torch_opoverload_packet: OpOverloadPacket = torch_opoverload._overloadpacket
337
338
schema: FunctionSchema = torch_opoverload._schema
339
+ baseutils.check(
340
+ not schema.is_mutable,
341
+ lambda: f"{custom_op} mutates one or more of its arguments, which is not supported",
342
+ )
343
+
344
schema_arguments: list[Argument] = schema.arguments
345
tensor_indices: tuple[int] = tuple(
346
i
0 commit comments