From 99b89db174ce0359a8724409b2bf9df244d6761b Mon Sep 17 00:00:00 2001 From: Andrew Gu Date: Thu, 16 Nov 2023 15:17:48 -0800 Subject: [PATCH] [DTensor] Added `op_call` in no-mesh dispatch assert message (#113903) This helps debug, e.g. when there is an unsupported op. Pull Request resolved: https://github.com/pytorch/pytorch/pull/113903 Approved by: https://github.com/wanchaol ghstack dependencies: #113654 --- torch/distributed/_tensor/dispatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/distributed/_tensor/dispatch.py b/torch/distributed/_tensor/dispatch.py index 587cc0faca5df..560bcb0101bd2 100644 --- a/torch/distributed/_tensor/dispatch.py +++ b/torch/distributed/_tensor/dispatch.py @@ -326,7 +326,7 @@ def unwrap_to_op_info( kwargs_schema[k] = v local_kwargs[k] = v - assert mesh is not None, "found no DeviceMesh from dtensor args!" + assert mesh is not None, f"found no DeviceMesh from dtensor args for {op_call}!" op_info = OpInfo( mesh, OpSchema(