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.
1 parent e85b3ee commit be52599Copy full SHA for be52599
thunder/torch/custom_op.py
@@ -249,6 +249,11 @@ def _convert_to_meta_function(func):
249
250
251
def _get_meta_function_from(custom_op: CustomOpDef) -> Callable[[Any], TensorProxy | tuple[TensorProxy, ...]]:
252
+ if custom_op._abstract_fn is None:
253
+ raise ValueError(
254
+ f"Custom op {custom_op._qualname} has no _abstract_fn defined. "
255
+ "You must provide an abstract function (using @torch.library.register_fake) when defining the custom op."
256
+ )
257
return _convert_to_meta_function(custom_op._abstract_fn)
258
259
0 commit comments