Skip to content

Commit

Permalink
Missing Shape Inference
Browse files Browse the repository at this point in the history
  • Loading branch information
keshavj-cerebras committed Feb 6, 2025
1 parent fd65a66 commit db76a7c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions projects/ltc/csrc/base_lazy_backend/shape_inference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,17 @@ std::vector<torch::lazy::Shape> compute_shape_native_group_norm(
return shapes;
}

std::vector<torch::lazy::Shape> compute_shape_prod(const at::Tensor& self,
c10::optional<at::ScalarType> dtype) {
if (dtype.has_value()) {
return {Shape(dtype.value(), {})};
}
if (isIntegralType(self.scalar_type(), true)) {
return {Shape(c10::ScalarType::Long, {})};
}
return {Shape(self.scalar_type(), {})};
}

std::vector<torch::lazy::Shape>
compute_shape_im2col(const at::Tensor &self, at::IntArrayRef kernel_size,
at::IntArrayRef dilation, at::IntArrayRef padding,
Expand Down

0 comments on commit db76a7c

Please sign in to comment.