- 1.1: Remove hardcoded 4096*512 buffer from PinnedBatcher; allocate host+device per-call - 1.2: Wrap CudaSlice in DLPackContext owned by DLManagedTensor.manager_ctx; deleter frees device memory when PyTorch releases tensor — no more silent overwrite across calls - 1.3: batch_encode_to_gpu now takes &self (no mutable shared state); TokenizerEngine wraps Arc<PinnedBatcher> and encode_batch takes &self — safe for concurrent Python threads - 1.4: seq_len = max across all encodings; host buffer prefilled with pad_id before token write Also: switch cudarc gpu feature from cuda-version-from-build-system to cuda-12050 to fix build on machines with CUDA 13.x (cudarc 0.11.9 only knows up to 12.5) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
57 lines
1.5 KiB
TOML
57 lines
1.5 KiB
TOML
[package]
|
|
name = "unchecked-io"
|
|
version = "0.1.7"
|
|
authors = ["Billthemaker"]
|
|
license = "Apache-2.0"
|
|
edition = "2024"
|
|
|
|
[lib]
|
|
name = "unchecked_io"
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[features]
|
|
default = []
|
|
gpu = [
|
|
"tokenizers",
|
|
"cudarc",
|
|
"pyo3-dlpack",
|
|
"cudarc/cuda-12050",
|
|
"dep:cuda-driver-sys"
|
|
]
|
|
profiling = ["dep:tracing", "dep:tracing-subscriber", "dep:tracing-tracy"]
|
|
|
|
[dependencies]
|
|
pyo3 = { version = "=0.27.0", features = ["extension-module", "chrono-tz", "chrono"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_yaml = "0.9"
|
|
arrow = { version = "57.0.0", features = ["prettyprint"] }
|
|
tokio = { version = "1.37", features = ["full"] }
|
|
tokio-postgres = "0.7"
|
|
deadpool-postgres = "0.14"
|
|
anyhow = "1.0"
|
|
futures-util = "0.3"
|
|
bytes = "1.6"
|
|
byteorder = "1.5"
|
|
chrono = "0.4"
|
|
chrono-tz = "=0.10.4"
|
|
uuid = { version = "1.8", features = ["serde", "v4"] }
|
|
pyo3-arrow = "0.15.0"
|
|
num_cpus = "1.16"
|
|
async-channel = "2.5.0"
|
|
rayon = "1.10"
|
|
|
|
# Optional dependencies enabled by features
|
|
# UPGRADED: 0.20 supports modern Llama tokenizer exports
|
|
tokenizers = { version = "0.20", optional = true }
|
|
cudarc = { version = "0.11", features = ["driver"], optional = true }
|
|
pyo3-dlpack = { version = "0.1.0", optional = true }
|
|
cuda-driver-sys = { version = "0.3.0", optional = true }
|
|
|
|
tracing-subscriber = { version = "0.3", features = ["registry", "env-filter"], optional = true}
|
|
tracing-tracy = { version = "=0.11.2", optional = true }
|
|
tracing = {version ="0.1.41", optional = true }
|
|
|
|
[target.'cfg(not(target_env = "msvc"))'.dependencies]
|
|
mimalloc = { version = "0.1.39" }
|
|
|