Cargo.toml 1.59 KB
Newer Older
1
2
3
4
5
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

[package]
name = "kvbm-kernels"
Ryan Olson's avatar
Ryan Olson committed
6
version = "1.0.0"
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
edition.workspace = true
authors.workspace = true
license.workspace = true
repository = "https://github.com/ai-dynamo/dynamo.git"
build = "build.rs"

[lib]
name = "kvbm_kernels"
crate-type = ["rlib", "cdylib"]

[features]
default = []
# Build kernels as a static archive (.a) instead of shared library (.so).
# When enabled, the kernel code is embedded directly into the consuming crate,
# eliminating the runtime dependency on libkvbm_kernels.so.
# Note: This only affects real CUDA builds; stubs always remain dynamic.
static-kernels = []

# Enable CUDA tests - only works when real CUDA kernels are built (not stubs)
# Tests are gated with #[cfg(all(test, feature = "testing-cuda", not(stub_kernels)))]
testing-cuda = []

# Enable operational_copy, universal_from_block, block_from_universal kernels.
# These kernels perform data layout permutation and are only needed for
# non-standard transfer paths. The default vectorized_copy kernel handles
# most FC↔LW transfers efficiently without permutation.
permute_kernels = []

# Enable kvbench example (pulls in clap for CLI)
kvbench = ["dep:clap"]

[[example]]
name = "kvbench"
required-features = ["kvbench"]

[dependencies]
cudarc = { workspace = true }

# kvbench
clap = { version = "4", features = ["derive"], optional = true }

[dev-dependencies]
ndarray = "0.17.2"
half = "2"
rand = { workspace = true }
cudarc = { workspace = true, features = ["f16"] }

[build-dependencies]