Skip to content

Commit 73ac279

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 b27a39b commit 73ac279

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
@@ -142,6 +142,7 @@ void unary_op(const Tensor& self, const Tensor& output, std::string op_name, Una
142142

143143
TORCH_IMPL_FUNC(log1p_out_mps) (const Tensor& self, const Tensor& output)
144144
{
145+
TORCH_CHECK(self.scalar_type() != ScalarType::Long, "MPS does not support log1p op with int64 input")
145146
using namespace mps;
146147
if (!output.is_same_size(self)) {
147148
output.resize_(self.sizes());

0 commit comments

Comments
 (0)