# 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 = "2024"
rust-version = "1.87"
name = "rlx-cuda"
version = "0.2.2"
authors = [
    "Eugene Hauptmann",
    "Nataliya Kosmyna",
]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "NVIDIA CUDA backend — cuBLAS for matmul + NVRTC-compiled kernels for everything else, via the pure-Rust `cudarc` crate."
homepage = "https://github.com/MIT-RLX/rlx"
documentation = "https://docs.rs/rlx"
readme = "README.md"
keywords = [
    "ml",
    "tensor",
    "compiler",
    "neural-network",
    "autodiff",
]
categories = [
    "science",
    "algorithms",
    "compilers",
]
license = "GPL-3.0-only"
repository = "https://github.com/MIT-RLX/rlx"
resolver = "2"

[features]
default = []
hip-cpu-validate = ["dep:cc"]
native-splat = []
nvtx = ["cudarc/nvtx"]

[lib]
name = "rlx_cuda"
path = "src/lib.rs"

[[example]]
name = "bench_matmul"
path = "examples/bench_matmul.rs"

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

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

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

[dependencies.cudarc]
version = "0.19"
features = [
    "std",
    "driver",
    "nvrtc",
    "cublas",
    "cublaslt",
    "cudnn",
    "cuda-12030",
    "dynamic-loading",
]
default-features = false

[dependencies.rlx-cpu]
version = "0.2.3"
features = ["splat"]

[dependencies.rlx-gpu-kernels]
version = "0.2.2"

[dependencies.rlx-ir]
version = "0.2.2"

[dependencies.rlx-opt]
version = "0.2.2"

[build-dependencies.cc]
version = "1"
optional = true

[lints.clippy]
collapsible_if = "allow"
doc_lazy_continuation = "allow"
doc_overindented_list_items = "allow"
large_enum_variant = "allow"
manual_range_contains = "allow"
missing_safety_doc = "allow"
needless_range_loop = "allow"
should_implement_trait = "allow"
single_range_in_vec_init = "allow"
too_many_arguments = "allow"
type_complexity = "allow"
unnecessary_wraps = "allow"
upper_case_acronyms = "allow"
useless_conversion = "allow"

[lints.clippy.all]
level = "warn"
priority = -1

[lints.rust.unused]
level = "warn"
priority = 0
