Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions csrc/host_ir/lower_to_communication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,8 @@ void lowerToBroadcast(
const DeviceMesh& sender_mesh = input_tv->getDeviceMesh();
const DeviceMesh& receiver_mesh = output_tv->getDeviceMesh();

NVF_ERROR_EQ(
sender_mesh.rank(),
1,
"Broadcast only supports a 1D sender mesh. Given ",
sender_mesh);
NVF_ERROR_EQ(
receiver_mesh.rank(),
1,
"Broadcast only supports a 1D receiver mesh. Given ",
receiver_mesh);
NVF_ERROR_EQ(sender_mesh.rank(), 1, "sender: ", input_tv->toString());
NVF_ERROR_EQ(receiver_mesh.rank(), 1, "receiver: ", output_tv->toString());
Comment on lines +151 to +152
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Error message regression: the previous message included the actual DeviceMesh ("Given ", sender_mesh/receiver_mesh). The new message prints TensorView::toString() but no longer prints the offending mesh, which can make debugging rank mismatches harder (you can’t see whether rank() is wrong because the mesh is unexpected vs the TV being different).

Consider keeping the original context and appending the TV string, e.g. include sender_mesh/receiver_mesh in the message as well.


DeviceIdxType root = sender_mesh.at(0);
Team team = receiver_mesh.vector();
Expand Down