Skip to content

Commit 531f23b

Browse files
Rename vec-dot to vec-ops. (huggingface#449)
* Rename vec-dot to vec-ops. * Also bump the crate version. * Add a currently empty readme.
1 parent 495e0b7 commit 531f23b

File tree

14 files changed

+30
-29
lines changed

14 files changed

+30
-29
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exclude = [
1515
]
1616

1717
[workspace.package]
18-
version = "0.1.0"
18+
version = "0.1.1"
1919
edition = "2021"
2020
description = "Minimalist ML framework."
2121
repository = "https://github.com/huggingface/candle"

candle-core/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ readme = "README.md"
1212
[dependencies]
1313
accelerate-src = { workspace = true, optional = true }
1414
byteorder = { workspace = true }
15-
candle-kernels = { path = "../candle-kernels", version = "0.1.0", optional = true }
15+
candle-kernels = { path = "../candle-kernels", version = "0.1.1", optional = true }
1616
cudarc = { workspace = true, optional = true }
1717
gemm = { workspace = true }
1818
half = { workspace = true }

candle-core/src/cpu/kernels.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub trait VecDot: num_traits::NumAssign + Copy {
1+
pub trait VecOps: num_traits::NumAssign + Copy {
22
/// Dot-product of two vectors.
33
///
44
/// # Safety
@@ -28,7 +28,7 @@ pub trait VecDot: num_traits::NumAssign + Copy {
2828
}
2929
}
3030

31-
impl VecDot for f32 {
31+
impl VecOps for f32 {
3232
#[inline(always)]
3333
unsafe fn vec_dot(lhs: *const Self, rhs: *const Self, res: *mut Self, len: usize) {
3434
super::vec_dot_f32(lhs, rhs, res, len)
@@ -40,7 +40,7 @@ impl VecDot for f32 {
4040
}
4141
}
4242

43-
impl VecDot for half::f16 {
43+
impl VecOps for half::f16 {
4444
#[inline(always)]
4545
unsafe fn vec_dot(lhs: *const Self, rhs: *const Self, res: *mut Self, len: usize) {
4646
let mut res_f32 = 0f32;
@@ -49,10 +49,10 @@ impl VecDot for half::f16 {
4949
}
5050
}
5151

52-
impl VecDot for f64 {}
53-
impl VecDot for half::bf16 {}
54-
impl VecDot for u8 {}
55-
impl VecDot for u32 {}
52+
impl VecOps for f64 {}
53+
impl VecOps for half::bf16 {}
54+
impl VecOps for u8 {}
55+
impl VecOps for u32 {}
5656

5757
#[inline(always)]
5858
pub fn par_for_each(n_threads: usize, func: impl Fn(usize) + Send + Sync) {

candle-core/src/dtype.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub trait WithDType:
6262
+ 'static
6363
+ Send
6464
+ Sync
65-
+ crate::cpu::kernels::VecDot
65+
+ crate::cpu::kernels::VecOps
6666
{
6767
const DTYPE: DType;
6868

candle-datasets/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ readme = "README.md"
1111

1212
[dependencies]
1313
byteorder = { workspace = true }
14-
candle = { path = "../candle-core", version = "0.1.0", package = "candle-core" }
15-
candle-nn = { path = "../candle-nn", version = "0.1.0" }
14+
candle = { path = "../candle-core", version = "0.1.1", package = "candle-core" }
15+
candle-nn = { path = "../candle-nn", version = "0.1.1" }
1616
hf-hub = { workspace = true}
1717
intel-mkl-src = { workspace = true, optional = true }
1818
memmap2 = { workspace = true }

candle-datasets/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# candle-datasets

candle-examples/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ readme = "README.md"
1111

1212
[dependencies]
1313
accelerate-src = { workspace = true, optional = true }
14-
candle = { path = "../candle-core", version = "0.1.0", package = "candle-core" }
15-
candle-datasets = { path = "../candle-datasets", version = "0.1.0" }
16-
candle-nn = { path = "../candle-nn", version = "0.1.0" }
17-
candle-transformers = { path = "../candle-transformers", version = "0.1.0" }
18-
candle-flash-attn = { path = "../candle-flash-attn", version = "0.1.0", optional = true }
14+
candle = { path = "../candle-core", version = "0.1.1", package = "candle-core" }
15+
candle-datasets = { path = "../candle-datasets", version = "0.1.1" }
16+
candle-nn = { path = "../candle-nn", version = "0.1.1" }
17+
candle-transformers = { path = "../candle-transformers", version = "0.1.1" }
18+
candle-flash-attn = { path = "../candle-flash-attn", version = "0.1.1", optional = true }
1919
safetensors = { workspace = true }
2020
serde = { workspace = true }
2121
serde_json = { workspace = true }

candle-flash-attn/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "candle-flash-attn"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2021"
55

66
description = "Flash attention layer for the candle ML framework."
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
1111
readme = "README.md"
1212

1313
[dependencies]
14-
candle = { path = "../candle-core", features = ["cuda"], version = "0.1.0", package = "candle-core" }
14+
candle = { path = "../candle-core", features = ["cuda"], version = "0.1.1", package = "candle-core" }
1515
half = { version = "2.3.1", features = ["num-traits"] }
1616

1717
[build-dependencies]
@@ -21,4 +21,4 @@ rayon = "1.7.0"
2121

2222
[dev-dependencies]
2323
anyhow = { version = "1", features = ["backtrace"] }
24-
candle-nn = { path = "../candle-nn", version = "0.1.0", features = ["cuda"] }
24+
candle-nn = { path = "../candle-nn", version = "0.1.1", features = ["cuda"] }

candle-kernels/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "candle-kernels"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2021"
55

66
description = "CUDA kernels for Candle"

candle-nn/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ readme = "README.md"
1111

1212
[dependencies]
1313
accelerate-src = { workspace = true, optional = true }
14-
candle = { path = "../candle-core", version = "0.1.0", package = "candle-core" }
14+
candle = { path = "../candle-core", version = "0.1.1", package = "candle-core" }
1515
thiserror = { workspace = true }
1616
intel-mkl-src = { workspace = true, optional = true }
1717
safetensors = { workspace = true }

candle-pyo3/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ crate-type = ["cdylib"]
1515
doc = false
1616

1717
[dependencies]
18-
candle = { path = "../candle-core", version = "0.1.0", package = "candle-core" }
18+
candle = { path = "../candle-core", version = "0.1.1", package = "candle-core" }
1919
half = { workspace = true }
2020
pyo3 = { version = "0.19.0", features = ["extension-module"] }
2121

candle-transformers/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ readme = "README.md"
1111

1212
[dependencies]
1313
accelerate-src = { workspace = true, optional = true }
14-
candle = { path = "../candle-core", version = "0.1.0", package = "candle-core" }
14+
candle = { path = "../candle-core", version = "0.1.1", package = "candle-core" }
1515
hf-hub = { workspace = true}
16-
candle-nn = { path = "../candle-nn", version = "0.1.0" }
16+
candle-nn = { path = "../candle-nn", version = "0.1.1" }
1717
intel-mkl-src = { workspace = true, optional = true }
1818
tokenizers = { workspace = true, features = ["onig"] }
1919
rand = { workspace = true }

candle-wasm-examples/llama2-c/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ categories.workspace = true
99
license.workspace = true
1010

1111
[dependencies]
12-
candle = { path = "../../candle-core", version = "0.1.0", package = "candle-core" }
13-
candle-nn = { path = "../../candle-nn", version = "0.1.0" }
12+
candle = { path = "../../candle-core", version = "0.1.1", package = "candle-core" }
13+
candle-nn = { path = "../../candle-nn", version = "0.1.1" }
1414
num-traits = { workspace = true }
1515
tokenizers = { workspace = true, features = ["unstable_wasm"] }
1616

candle-wasm-examples/whisper/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ categories.workspace = true
99
license.workspace = true
1010

1111
[dependencies]
12-
candle = { path = "../../candle-core", version = "0.1.0", package = "candle-core" }
13-
candle-nn = { path = "../../candle-nn", version = "0.1.0" }
12+
candle = { path = "../../candle-core", version = "0.1.1", package = "candle-core" }
13+
candle-nn = { path = "../../candle-nn", version = "0.1.1" }
1414
num-traits = { workspace = true }
1515
tokenizers = { workspace = true, features = ["unstable_wasm"] }
1616

0 commit comments

Comments
 (0)