ext/torch/tensor.cpp in torch-rb-0.14.1 vs ext/torch/tensor.cpp in torch-rb-0.15.0
- old
+ new
@@ -101,9 +101,10 @@
rb_define_method(rb_cTensor, "backward", (VALUE (*)(...)) tensor__backward, -1);
rb_cTensor
.define_method("cuda?", [](Tensor& self) { return self.is_cuda(); })
+ .define_method("mps?", [](Tensor& self) { return self.is_mps(); })
.define_method("sparse?", [](Tensor& self) { return self.is_sparse(); })
.define_method("quantized?", [](Tensor& self) { return self.is_quantized(); })
.define_method("dim", [](Tensor& self) { return self.dim(); })
.define_method("numel", [](Tensor& self) { return self.numel(); })
.define_method("element_size", [](Tensor& self) { return self.element_size(); })