Skip to content

Commit 5859582

Browse files
malfetpytorchmergebot
authored andcommitted
[BE][MPS] Delete unused complex_mul_out (pytorch#154175)
It's no longer called, after `mul` has been migrated to binary op Pull Request resolved: pytorch#154175 Approved by: https://github.com/dcci, https://github.com/Skylion007
1 parent 2225231 commit 5859582

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

aten/src/ATen/native/mps/operations/BinaryKernel.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@ void binary_op_kernel(
77
const Tensor& other,
88
const Tensor& output,
99
const std::optional<Scalar> alpha = std::nullopt);
10-
void complex_mul_out(
11-
const Tensor& input,
12-
const Tensor& other,
13-
const Tensor& output);
1410
} // namespace at::native::mps

aten/src/ATen/native/mps/operations/BinaryKernel.mm

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,6 @@
3333

3434
namespace mps {
3535

36-
void complex_mul_out(const Tensor& input, const Tensor& other, const Tensor& output) {
37-
TORCH_INTERNAL_ASSERT(c10::isComplexType(input.scalar_type()) || c10::isComplexType(other.scalar_type()));
38-
auto new_size = at::infer_size(input.sizes(), other.sizes());
39-
if (!output.sizes().equals(new_size)) {
40-
output.resize_(new_size);
41-
}
42-
uint32_t length = output.numel();
43-
if (length == 0) {
44-
return;
45-
}
46-
auto common_dtype = output.scalar_type();
47-
auto input_cast = input.to(kMPS, common_dtype);
48-
auto other_cast = other.to(kMPS, common_dtype);
49-
auto iter = TensorIteratorConfig().add_output(output).add_input(input_cast).add_input(other_cast).build();
50-
51-
lib.exec_binary_kernel(iter, "complex_mul");
52-
}
53-
5436
void binary_op_kernel(const std::string func_name,
5537
const Tensor& input,
5638
const Tensor& other,

0 commit comments

Comments
 (0)