mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 11:08:52 +00:00
Tensor are not necessarily sendable (CustomOp1).
This commit is contained in:
@ -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;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user