silvic-gpu 0.1.0

Metal and CUDA backends for silvic: one kernel source, compiled at run time for either device
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.94.1"
name = "silvic-gpu"
version = "0.1.0"
authors = ["Ben Magyar <me@benmagyar.com>"]
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Metal and CUDA backends for silvic: one kernel source, compiled at run time for either device"
homepage = "https://benmagyar.github.io/silvic/"
readme = "README.md"
keywords = [
    "lightgbm",
    "gbdt",
    "metal",
    "cuda",
    "gpu",
]
license = "MIT"
repository = "https://github.com/BenMagyar/silvic"

[features]
cuda = ["dep:cudarc"]
metal = [
    "dep:objc2",
    "dep:objc2-foundation",
    "dep:objc2-metal",
]

[lib]
name = "silvic_gpu"
path = "src/lib.rs"
bench = false

[[test]]
name = "cuda_syntax"
path = "tests/cuda_syntax.rs"

[[test]]
name = "metal_backend"
path = "tests/metal_backend.rs"

[[bench]]
name = "histogram"
path = "benches/histogram.rs"
harness = false
required-features = ["metal"]

[dependencies.bytemuck]
version = "1.25"
features = ["derive"]

[dependencies.cudarc]
version = "0.19"
features = [
    "std",
    "driver",
    "nvrtc",
    "dynamic-loading",
    "cuda-12080",
]
optional = true
default-features = false

[dependencies.rayon]
version = "1.12"

[dependencies.silvic-core]
version = "0.1.0"

[dependencies.tracing]
version = "0.1"

[dev-dependencies.criterion]
version = "0.8"

[target.'cfg(target_os = "macos")'.dependencies.objc2]
version = "0.6"
optional = true

[target.'cfg(target_os = "macos")'.dependencies.objc2-foundation]
version = "0.3"
features = [
    "std",
    "NSString",
    "NSError",
    "NSArray",
]
optional = true
default-features = false

[target.'cfg(target_os = "macos")'.dependencies.objc2-metal]
version = "0.3"
features = [
    "std",
    "MTLDevice",
    "MTLBuffer",
    "MTLResource",
    "MTLLibrary",
    "MTLCommandQueue",
    "MTLCommandBuffer",
    "MTLComputeCommandEncoder",
    "MTLCommandEncoder",
    "MTLComputePipeline",
    "MTLTypes",
    "MTLAllocation",
]
optional = true
default-features = false

[lints.clippy]
cognitive_complexity = "warn"
many_single_char_names = "warn"