[package]
edition = "2024"
rust-version = "1.99"
name = "nuvec-gpu"
version = "0.6.1"
authors = ["hupe1980"]
build = false
exclude = ["tests/fixtures"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Metal runtime for nuvec: device, pipelines, buffers, command encoding, allocator and profiler"
homepage = "https://hupe1980.github.io/nuvec"
readme = "README.md"
keywords = [
"mlx",
"metal",
"apple-silicon",
"machine-learning",
"tensor",
]
categories = [
"science",
"mathematics",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/hupe1980/nuvec"
[package.metadata.docs.rs]
targets = ["aarch64-apple-darwin"]
[features]
cuda = [
"nuvec-kernels/cuda",
"dep:cuda-core",
"dep:cuda-async",
"dep:cutile",
"dep:half",
]
[lib]
name = "nuvec_gpu"
path = "src/lib.rs"
[[example]]
name = "cuda_bench"
path = "examples/cuda_bench.rs"
required-features = ["cuda"]
[[test]]
name = "allocator"
path = "tests/allocator.rs"
[[test]]
name = "cuda_spike"
path = "tests/cuda_spike.rs"
[[test]]
name = "event"
path = "tests/event.rs"
[[test]]
name = "runtime"
path = "tests/runtime.rs"
[dependencies.nuvec-kernels]
version = "0.6.1"
[target.'cfg(target_os = "linux")'.dependencies.cuda-async]
version = "=0.4.0"
optional = true
[target.'cfg(target_os = "linux")'.dependencies.cuda-core]
version = "=0.4.0"
optional = true
[target.'cfg(target_os = "linux")'.dependencies.cutile]
version = "=0.4.0"
optional = true
[target.'cfg(target_os = "linux")'.dependencies.half]
version = "2.7"
features = ["bytemuck"]
optional = true
[target.'cfg(target_os = "macos")'.dependencies.block2]
version = "0.6"
[target.'cfg(target_os = "macos")'.dependencies.dispatch2]
version = "0.3"
features = [
"std",
"objc2",
"block2",
]
default-features = false
[target.'cfg(target_os = "macos")'.dependencies.libc]
version = "0.2"
[target.'cfg(target_os = "macos")'.dependencies.objc2]
version = "0.6"
[target.'cfg(target_os = "macos")'.dependencies.objc2-foundation]
version = "0.3"
features = [
"std",
"NSString",
"NSError",
"NSProcessInfo",
"NSURL",
]
default-features = false
[target.'cfg(target_os = "macos")'.dependencies.objc2-metal]
version = "0.3"
features = [
"std",
"block2",
"dispatch2",
"MTLAllocation",
"MTLBuffer",
"MTLCaptureManager",
"MTLCommandBuffer",
"MTLCommandEncoder",
"MTLCommandQueue",
"MTLComputeCommandEncoder",
"MTLComputePipeline",
"MTLDataType",
"MTLDevice",
"MTLEvent",
"MTLFence",
"MTLFunctionConstantValues",
"MTLLibrary",
"MTLResidencySet",
"MTLResource",
"MTLTypes",
"objc2-core-foundation",
]
default-features = false
[lints.clippy]
missing_safety_doc = "deny"
multiple_unsafe_ops_per_block = "deny"
undocumented_unsafe_blocks = "deny"
[lints.clippy.all]
level = "warn"
priority = -1
[lints.rust]
missing_docs = "warn"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "deny"