Tensor are not necessarily sendable (CustomOp1).

This commit is contained in:
Nicolas Patry
2023-07-25 22:53:09 +02:00
parent b7814f66b4
commit 1553b58fe5

View File

@ -11,12 +11,9 @@ pub fn wrap_err(err: ::candle::Error) -> PyErr {
} }
#[derive(Clone)] #[derive(Clone)]
#[pyclass(name = "Tensor")] #[pyclass(name = "Tensor", unsendable)]
struct PyTensor(Tensor); struct PyTensor(Tensor);
unsafe impl Send for PyTensor {}
unsafe impl Sync for PyTensor {}
impl std::ops::Deref for PyTensor { impl std::ops::Deref for PyTensor {
type Target = Tensor; type Target = Tensor;