PyO3 is back.

This commit is contained in:
Nicolas Patry
2023-07-25 22:44:30 +02:00
parent ed58de7551
commit b7814f66b4
2 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,7 @@ members = [
"candle-core",
"candle-examples",
"candle-nn",
# "candle-pyo3",
"candle-pyo3",
"candle-transformers",
"candle-wasm-examples/llama2-c",
"candle-wasm-examples/whisper",

View File

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