Skip to content
Merged
Changes from 2 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
3 changes: 3 additions & 0 deletions fuse/eval/metrics/metrics_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ def sync_tensor_data_and_concat(data: torch.Tensor) -> torch.Tensor:
data, torch.Tensor
), f"ERROR, Fuse Metrics only supports gathering of torch.Tensor at this time. You tried gathering {type(data)}"

if not data.is_contiguous():
data = data.contiguous()

# if data is 1d, torch.vstack will add another dimension which we do not want
is_1d = len(data.shape) == 1
if is_1d:
Expand Down