Skip to content

Commit

Permalink
use empty_strided_meta API
Browse files Browse the repository at this point in the history
  • Loading branch information
Priya2698 committed Jan 17, 2025
1 parent c91ff93 commit 2aad6e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions csrc/ir/nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4537,9 +4537,7 @@ std::vector<PolymorphicValue> MatmulOp::evaluate(

auto matmul_out = at::matmul(a, b);
const auto& [sizes, strides] = inferShapeOfOutput(out(), ee);
auto options =
c10::TensorOptions().device(c10::Device(c10::DeviceType::Meta));
auto meta_out = at::empty_strided(sizes, strides, options);
auto meta_out = at::detail::empty_strided_meta(sizes, strides, a.dtype());
if (meta_out.is_contiguous()) {
return {matmul_out};
}
Expand Down

0 comments on commit 2aad6e6

Please sign in to comment.