Skip to content

Commit 1123fb3

Browse files
committed
eckit::linalg::dense::LinearAlgebraTorch completion
1 parent 7c6ee99 commit 1123fb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/eckit/linalg/dense/LinearAlgebraTorch.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Scalar LinearAlgebraTorch::dot(const Vector& x, const Vector& y) const {
3838
auto x_tensor = make_dense_tensor(x);
3939
auto y_tensor = make_dense_tensor(y);
4040

41-
return torch::dot(x_tensor, y_tensor).to(torch::DeviceType::CPU, torch::kFloat64).item<Scalar>();
41+
return tensor_to_host(torch::dot(x_tensor, y_tensor)).item<Scalar>();
4242
}
4343

4444

0 commit comments

Comments
 (0)