diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index 14c3036e..087dfde6 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -578,6 +578,8 @@ impl Open { .getattr(intern!(py, "view"))? .call((), Some(&view_kwargs))?; + println!("Byte order {byteorder}"); + if byteorder == "big" { let version: String = torch.getattr(intern!(py, "__version__"))?.extract()?; @@ -585,6 +587,7 @@ impl Open { Version::from_string(&version).map_err(SafetensorError::new_err)?; if version >= Version::new(2, 1, 0) { let dtype: PyObject = get_pydtype(torch, info.dtype, false)?; + println!("Using torch byteswap"); tensor .getattr(intern!(py, "untyped_storage"))? .call0()? @@ -597,6 +600,7 @@ impl Open { } else { let inplace_kwargs = [(intern!(py, "inplace"), false.into_py(py))] .into_py_dict_bound(py); + println!("Using numpy byteswap"); let numpy = tensor .getattr(intern!(py, "numpy"))? .call0()?