Skip to content

Commit 3b8e823

Browse files
abhudevkulinseth
authored andcommitted
Add error messages for int64 non-available ops (#80)
* Add error messages for int64 non-available ops * Move warning to common code
1 parent 853245b commit 3b8e823

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ Tensor relu_mps(const Tensor& self) {
416416
using namespace mps;
417417
using CachedGraph = MPSUnaryCachedGraph;
418418
TORCH_CHECK(output.is_mps());
419+
TORCH_CHECK(self.scalar_type() != ScalarType::Long, "MPS does not support sigmoid op with int64 input")
419420

420421
if(output.numel() == 0) {
421422
return;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ void unary_op(const Tensor& self, const Tensor& output, std::string op_name, Una
188188

189189
TORCH_IMPL_FUNC(log1p_out_mps) (const Tensor& self, const Tensor& output)
190190
{
191+
TORCH_CHECK(self.scalar_type() != ScalarType::Long, "MPS does not support log1p op with int64 input")
191192
using namespace mps;
192193
if (!output.is_same_size(self)) {
193194
output.resize_(self.sizes());

0 commit comments

Comments
 (0)