Rename vec-dot to vec-ops. (#449)
* Rename vec-dot to vec-ops. * Also bump the crate version. * Add a currently empty readme.
This commit is contained in:
parent
495e0b7580
commit
531f23b4d0
|
@ -15,7 +15,7 @@ exclude = [
|
|||
]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
description = "Minimalist ML framework."
|
||||
repository = "https://github.com/huggingface/candle"
|
||||
|
|
|
@ -12,7 +12,7 @@ readme = "README.md"
|
|||
[dependencies]
|
||||
accelerate-src = { workspace = true, optional = true }
|
||||
byteorder = { workspace = true }
|
||||
candle-kernels = { path = "../candle-kernels", version = "0.1.0", optional = true }
|
||||
candle-kernels = { path = "../candle-kernels", version = "0.1.1", optional = true }
|
||||
cudarc = { workspace = true, optional = true }
|
||||
gemm = { workspace = true }
|
||||
half = { workspace = true }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pub trait VecDot: num_traits::NumAssign + Copy {
|
||||
pub trait VecOps: num_traits::NumAssign + Copy {
|
||||
/// Dot-product of two vectors.
|
||||
///
|
||||
/// # Safety
|
||||
|
@ -28,7 +28,7 @@ pub trait VecDot: num_traits::NumAssign + Copy {
|
|||
}
|
||||
}
|
||||
|
||||
impl VecDot for f32 {
|
||||
impl VecOps for f32 {
|
||||
#[inline(always)]
|
||||
unsafe fn vec_dot(lhs: *const Self, rhs: *const Self, res: *mut Self, len: usize) {
|
||||
super::vec_dot_f32(lhs, rhs, res, len)
|
||||
|
@ -40,7 +40,7 @@ impl VecDot for f32 {
|
|||
}
|
||||
}
|
||||
|
||||
impl VecDot for half::f16 {
|
||||
impl VecOps for half::f16 {
|
||||
#[inline(always)]
|
||||
unsafe fn vec_dot(lhs: *const Self, rhs: *const Self, res: *mut Self, len: usize) {
|
||||
let mut res_f32 = 0f32;
|
||||
|
@ -49,10 +49,10 @@ impl VecDot for half::f16 {
|
|||
}
|
||||
}
|
||||
|
||||
impl VecDot for f64 {}
|
||||
impl VecDot for half::bf16 {}
|
||||
impl VecDot for u8 {}
|
||||
impl VecDot for u32 {}
|
||||
impl VecOps for f64 {}
|
||||
impl VecOps for half::bf16 {}
|
||||
impl VecOps for u8 {}
|
||||
impl VecOps for u32 {}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn par_for_each(n_threads: usize, func: impl Fn(usize) + Send + Sync) {
|
||||
|
|
|
@ -62,7 +62,7 @@ pub trait WithDType:
|
|||
+ 'static
|
||||
+ Send
|
||||
+ Sync
|
||||
+ crate::cpu::kernels::VecDot
|
||||
+ crate::cpu::kernels::VecOps
|
||||
{
|
||||
const DTYPE: DType;
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ readme = "README.md"
|
|||
|
||||
[dependencies]
|
||||
byteorder = { workspace = true }
|
||||
candle = { path = "../candle-core", version = "0.1.0", package = "candle-core" }
|
||||
candle-nn = { path = "../candle-nn", version = "0.1.0" }
|
||||
candle = { path = "../candle-core", version = "0.1.1", package = "candle-core" }
|
||||
candle-nn = { path = "../candle-nn", version = "0.1.1" }
|
||||
hf-hub = { workspace = true}
|
||||
intel-mkl-src = { workspace = true, optional = true }
|
||||
memmap2 = { workspace = true }
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
# candle-datasets
|
|
@ -11,11 +11,11 @@ readme = "README.md"
|
|||
|
||||
[dependencies]
|
||||
accelerate-src = { workspace = true, optional = true }
|
||||
candle = { path = "../candle-core", version = "0.1.0", package = "candle-core" }
|
||||
candle-datasets = { path = "../candle-datasets", version = "0.1.0" }
|
||||
candle-nn = { path = "../candle-nn", version = "0.1.0" }
|
||||
candle-transformers = { path = "../candle-transformers", version = "0.1.0" }
|
||||
candle-flash-attn = { path = "../candle-flash-attn", version = "0.1.0", optional = true }
|
||||
candle = { path = "../candle-core", version = "0.1.1", package = "candle-core" }
|
||||
candle-datasets = { path = "../candle-datasets", version = "0.1.1" }
|
||||
candle-nn = { path = "../candle-nn", version = "0.1.1" }
|
||||
candle-transformers = { path = "../candle-transformers", version = "0.1.1" }
|
||||
candle-flash-attn = { path = "../candle-flash-attn", version = "0.1.1", optional = true }
|
||||
safetensors = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "candle-flash-attn"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
|
||||
description = "Flash attention layer for the candle ML framework."
|
||||
|
@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
|
|||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
candle = { path = "../candle-core", features = ["cuda"], version = "0.1.0", package = "candle-core" }
|
||||
candle = { path = "../candle-core", features = ["cuda"], version = "0.1.1", package = "candle-core" }
|
||||
half = { version = "2.3.1", features = ["num-traits"] }
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -21,4 +21,4 @@ rayon = "1.7.0"
|
|||
|
||||
[dev-dependencies]
|
||||
anyhow = { version = "1", features = ["backtrace"] }
|
||||
candle-nn = { path = "../candle-nn", version = "0.1.0", features = ["cuda"] }
|
||||
candle-nn = { path = "../candle-nn", version = "0.1.1", features = ["cuda"] }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "candle-kernels"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
|
||||
description = "CUDA kernels for Candle"
|
||||
|
|
|
@ -11,7 +11,7 @@ readme = "README.md"
|
|||
|
||||
[dependencies]
|
||||
accelerate-src = { workspace = true, optional = true }
|
||||
candle = { path = "../candle-core", version = "0.1.0", package = "candle-core" }
|
||||
candle = { path = "../candle-core", version = "0.1.1", package = "candle-core" }
|
||||
thiserror = { workspace = true }
|
||||
intel-mkl-src = { workspace = true, optional = true }
|
||||
safetensors = { workspace = true }
|
||||
|
|
|
@ -15,7 +15,7 @@ crate-type = ["cdylib"]
|
|||
doc = false
|
||||
|
||||
[dependencies]
|
||||
candle = { path = "../candle-core", version = "0.1.0", package = "candle-core" }
|
||||
candle = { path = "../candle-core", version = "0.1.1", package = "candle-core" }
|
||||
half = { workspace = true }
|
||||
pyo3 = { version = "0.19.0", features = ["extension-module"] }
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ readme = "README.md"
|
|||
|
||||
[dependencies]
|
||||
accelerate-src = { workspace = true, optional = true }
|
||||
candle = { path = "../candle-core", version = "0.1.0", package = "candle-core" }
|
||||
candle = { path = "../candle-core", version = "0.1.1", package = "candle-core" }
|
||||
hf-hub = { workspace = true}
|
||||
candle-nn = { path = "../candle-nn", version = "0.1.0" }
|
||||
candle-nn = { path = "../candle-nn", version = "0.1.1" }
|
||||
intel-mkl-src = { workspace = true, optional = true }
|
||||
tokenizers = { workspace = true, features = ["onig"] }
|
||||
rand = { workspace = true }
|
||||
|
|
|
@ -9,8 +9,8 @@ categories.workspace = true
|
|||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
candle = { path = "../../candle-core", version = "0.1.0", package = "candle-core" }
|
||||
candle-nn = { path = "../../candle-nn", version = "0.1.0" }
|
||||
candle = { path = "../../candle-core", version = "0.1.1", package = "candle-core" }
|
||||
candle-nn = { path = "../../candle-nn", version = "0.1.1" }
|
||||
num-traits = { workspace = true }
|
||||
tokenizers = { workspace = true, features = ["unstable_wasm"] }
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ categories.workspace = true
|
|||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
candle = { path = "../../candle-core", version = "0.1.0", package = "candle-core" }
|
||||
candle-nn = { path = "../../candle-nn", version = "0.1.0" }
|
||||
candle = { path = "../../candle-core", version = "0.1.1", package = "candle-core" }
|
||||
candle-nn = { path = "../../candle-nn", version = "0.1.1" }
|
||||
num-traits = { workspace = true }
|
||||
tokenizers = { workspace = true, features = ["unstable_wasm"] }
|
||||
|
||||
|
|
Loading…
Reference in New Issue