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:
Laurent Mazare 2023-08-15 10:48:57 +01:00 committed by GitHub
parent 495e0b7580
commit 531f23b4d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 30 additions and 29 deletions

View File

@ -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"

View File

@ -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 }

View File

@ -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) {

View File

@ -62,7 +62,7 @@ pub trait WithDType:
+ 'static
+ Send
+ Sync
+ crate::cpu::kernels::VecDot
+ crate::cpu::kernels::VecOps
{
const DTYPE: DType;

View File

@ -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 }

View File

@ -0,0 +1 @@
# candle-datasets

View File

@ -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 }

View File

@ -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"] }

View File

@ -1,6 +1,6 @@
[package]
name = "candle-kernels"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
description = "CUDA kernels for Candle"

View File

@ -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 }

View File

@ -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"] }

View File

@ -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 }

View File

@ -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"] }

View File

@ -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"] }