mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 11:08:52 +00:00
Split the tensor file.
This commit is contained in:
14
src/dtype.rs
Normal file
14
src/dtype.rs
Normal file
@ -0,0 +1,14 @@
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum DType {
|
||||
F32,
|
||||
F64,
|
||||
}
|
||||
|
||||
impl DType {
|
||||
pub fn size_in_bytes(&self) -> usize {
|
||||
match self {
|
||||
Self::F32 => 4,
|
||||
Self::F64 => 8,
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user