Skip to content

Commit

Permalink
More detailed logging in merge_pooled_embedding (#2653)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2653

As titled

Reviewed By: sryap

Differential Revision: D58014730

fbshipit-source-id: 1b79686214aefd153c479c9f4816cfdd5688c43c
  • Loading branch information
gnahzg authored and facebook-github-bot committed Jun 3, 2024
1 parent a50b09f commit 9bb687c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,17 @@ cat_dim_2d_output_shape(
for (const auto& t : tensors) {
TORCH_CHECK(t.dim() == 2);
// only support two-dimension tensors.
TORCH_CHECK(t.size(1 - cat_dim) == uncat_dim_size);
TORCH_CHECK(
t.size(1 - cat_dim) == uncat_dim_size,
"cat dim does not match, ",
"compare tensor dim = ",
1 - cat_dim,
", expect size = ",
uncat_dim_size,
", but got size = ",
t.size(1 - cat_dim),
" on device ",
t.get_device());
total_cat_dim += t.size(cat_dim);
cumulative_dims.push_back(total_cat_dim);
}
Expand Down

0 comments on commit 9bb687c

Please sign in to comment.