mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 19:47:12 +00:00
Refactor the hierarchy.
This commit is contained in:
29
candle-core/src/lib.rs
Normal file
29
candle-core/src/lib.rs
Normal file
@ -0,0 +1,29 @@
|
||||
mod backprop;
|
||||
mod cpu_backend;
|
||||
#[cfg(feature = "cuda")]
|
||||
mod cuda_backend;
|
||||
mod device;
|
||||
mod dtype;
|
||||
mod dummy_cuda_backend;
|
||||
mod error;
|
||||
mod npy;
|
||||
mod op;
|
||||
mod shape;
|
||||
mod storage;
|
||||
mod strided_index;
|
||||
mod tensor;
|
||||
|
||||
pub use cpu_backend::CpuStorage;
|
||||
pub use device::{Device, DeviceLocation};
|
||||
pub use dtype::{DType, WithDType};
|
||||
pub use error::{Error, Result};
|
||||
pub use shape::Shape;
|
||||
pub use storage::Storage;
|
||||
use strided_index::StridedIndex;
|
||||
pub use tensor::{Tensor, TensorId};
|
||||
|
||||
#[cfg(feature = "cuda")]
|
||||
pub use cuda_backend::{CudaDevice, CudaError, CudaStorage};
|
||||
|
||||
#[cfg(not(feature = "cuda"))]
|
||||
pub use dummy_cuda_backend::{CudaDevice, CudaError, CudaStorage};
|
Reference in New Issue
Block a user