[[bench]]
name = "advanced_optimizer_benchmark"
path = "benches/advanced_optimizer_benchmark.rs"
[[bench]]
harness = false
name = "autograd_ops"
path = "benches/autograd_ops.rs"
[[bench]]
harness = false
name = "distributed_benchmark"
path = "benches/distributed_benchmark.rs"
[[bench]]
harness = false
name = "distributions_benchmark"
path = "benches/distributions_benchmark.rs"
[[bench]]
harness = false
name = "fft_benchmark"
path = "benches/fft_benchmark.rs"
[[bench]]
harness = false
name = "manual_quick_bench"
path = "benches/manual_quick_bench.rs"
required-features = ["linalg"]
[[bench]]
harness = false
name = "matrix_decomp_micro_bench"
path = "benches/matrix_decomp_micro_bench.rs"
required-features = ["linalg"]
[[bench]]
harness = false
name = "matrix_decomposition_benchmark"
path = "benches/matrix_decomposition_benchmark.rs"
required-features = ["linalg"]
[[bench]]
name = "memory_pool"
path = "benches/memory_pool.rs"
[[bench]]
name = "metal_benchmark"
path = "benches/metal_benchmark.rs"
[[bench]]
name = "metal_gpu_performance"
path = "benches/metal_gpu_performance.rs"
[[bench]]
harness = false
name = "micro_distributions_benchmark"
path = "benches/micro_distributions_benchmark.rs"
[[bench]]
name = "mixed_precision_benchmark"
path = "benches/mixed_precision_benchmark.rs"
[[bench]]
name = "multi_gpu_benchmark"
path = "benches/multi_gpu_benchmark.rs"
[[bench]]
harness = false
name = "nn_benchmark"
path = "benches/nn_benchmark.rs"
[[bench]]
harness = false
name = "optimization_benchmark"
path = "benches/optimization_benchmark.rs"
[[bench]]
harness = false
name = "optimized_matrix_benchmark"
path = "benches/optimized_matrix_benchmark.rs"
required-features = ["linalg"]
[[bench]]
name = "optimized_ops"
path = "benches/optimized_ops.rs"
[[bench]]
name = "phase3_benchmarks"
path = "benches/phase3_benchmarks.rs"
[[bench]]
name = "phase4_benchmarks"
path = "benches/phase4_benchmarks.rs"
[[bench]]
harness = false
name = "quick_benchmark"
path = "benches/quick_benchmark.rs"
[[bench]]
harness = false
name = "quick_distributions_benchmark"
path = "benches/quick_distributions_benchmark.rs"
[[bench]]
harness = false
name = "quick_matrix_benchmark"
path = "benches/quick_matrix_benchmark.rs"
required-features = ["linalg"]
[[bench]]
harness = false
name = "simple_distributions_bench"
path = "benches/simple_distributions_bench.rs"
[[bench]]
harness = false
name = "simple_gpu_bench"
path = "benches/simple_gpu_bench.rs"
[[bench]]
name = "simple_performance_test"
path = "benches/simple_performance_test.rs"
[[bench]]
harness = false
name = "special_functions_benchmark"
path = "benches/special_functions_benchmark.rs"
[[bench]]
harness = false
name = "tensor_ops"
path = "benches/tensor_ops.rs"
[[bin]]
name = "benchmark_runner"
path = "src/bin/benchmark_runner.rs"
[[bin]]
name = "quick_optimizer_bench"
path = "src/bin/quick_optimizer_bench.rs"
[dependencies.anyhow]
version = "1.0"
[dependencies.approx]
version = "0.5"
[dependencies.base64]
optional = true
version = "0.21"
[dependencies.bincode]
version = "1.3"
[dependencies.bytemuck]
optional = true
version = "1.14"
[dependencies.bytes]
optional = true
version = "1.5"
[dependencies.chrono]
features = ["serde"]
version = "0.4"
[dependencies.console_error_panic_hook]
optional = true
version = "0.1"
[dependencies.crc32fast]
version = "1.4"
[dependencies.cudarc]
features = ["f16", "cublas", "cuda-12050"]
optional = true
version = "0.11"
[dependencies.digest]
optional = true
version = "0.10"
[dependencies.dirs]
optional = true
version = "5.0"
[dependencies.futures-util]
optional = true
version = "0.3"
[dependencies.half]
version = "2.2"
[dependencies.js-sys]
optional = true
version = "0.3"
[dependencies.lazy_static]
version = "1.4"
[dependencies.libc]
version = "0.2"
[dependencies.md5]
optional = true
version = "0.7"
[dependencies.memmap2]
optional = true
version = "0.9"
[dependencies.metal]
optional = true
version = "0.32"
[dependencies.nccl]
optional = true
version = "0.6"
[dependencies.ndarray]
features = ["rayon", "approx"]
version = "0.16.1"
[dependencies.ndarray-linalg]
optional = true
version = "0.17.0"
[dependencies.ndarray-rand]
version = "0.15.0"
[dependencies.num-complex]
version = "0.4"
[dependencies.num-traits]
version = "0.2"
[dependencies.num_cpus]
version = "1.16"
[dependencies.numpy]
optional = true
version = "0.24"
[dependencies.objc]
optional = true
version = "0.2"
[dependencies.objc2-core-ml]
optional = true
version = "0.2"
[dependencies.objc2-foundation]
optional = true
version = "0.2"
[dependencies.opencl3]
optional = true
version = "0.9"
[dependencies.ort]
optional = true
version = "2.0.0-rc.10"
[dependencies.parking_lot]
version = "0.12"
[dependencies.prost]
optional = true
version = "0.12"
[dependencies.prost-build]
optional = true
version = "0.12"
[dependencies.prost-derive]
optional = true
version = "0.12"
[dependencies.prost-types]
optional = true
version = "0.12"
[dependencies.protobuf]
optional = true
version = "3.3"
[dependencies.pyo3]
features = ["extension-module"]
optional = true
version = "0.24.1"
[dependencies.rand]
features = ["std", "std_rng"]
version = "0.8.5"
[dependencies.rand_distr]
version = "0.4.3"
[dependencies.rayon]
version = "1.10.0"
[dependencies.regex]
version = "1.11.2"
[dependencies.reqwest]
features = ["stream", "json"]
optional = true
version = "0.11"
[dependencies.rustorch-macros]
version = "0.6.29"
[dependencies.safetensors]
optional = true
version = "0.4"
[dependencies.serde]
features = ["derive", "rc"]
version = "1.0.202"
[dependencies.serde_json]
version = "1.0"
[dependencies.serde_yaml]
version = "0.9"
[dependencies.sha2]
optional = true
version = "0.10"
[dependencies.tempfile]
optional = true
version = "3.0"
[dependencies.thiserror]
version = "1.0"
[dependencies.tokio]
features = ["full"]
optional = true
version = "1.0"
[dependencies.wasm-bindgen]
optional = true
version = "0.2"
[dependencies.wasm-bindgen-futures]
optional = true
version = "0.4"
[dependencies.web-sys]
features = ["console", "Window", "Document", "Element", "HtmlElement", "HtmlInputElement", "HtmlCanvasElement", "CanvasRenderingContext2d", "Storage", "Worker", "Performance", "Navigator", "Gpu", "GpuDevice", "GpuQueue", "GpuBuffer", "GpuTexture", "IdbFactory", "IdbDatabase", "IdbTransaction", "IdbObjectStore", "IdbRequest", "IdbOpenDbRequest", "IdbTransactionMode", "Event", "EventTarget", "IdbVersionChangeEvent"]
optional = true
version = "0.3"
[dependencies.wgpu]
features = ["webgl", "webgpu"]
optional = true
version = "23.0"
[dependencies.wgpu-core]
optional = true
version = "23.0"
[dependencies.wgpu-hal]
optional = true
version = "23.0"
[dependencies.wgpu-types]
optional = true
version = "23.0"
[dev-dependencies.tempfile]
version = "3.8"
[dev-dependencies.wasm-bindgen-test]
version = "0.3"
[[example]]
name = "activation_demo"
path = "examples/activation_demo.rs"
[[example]]
name = "adamw_scheduler_demo"
path = "examples/adamw_scheduler_demo.rs"
[[example]]
name = "all_features_heavy_benchmark"
path = "examples/all_features_heavy_benchmark.rs"
[[example]]
name = "autograd_demo"
path = "examples/autograd_demo.rs"
[[example]]
name = "batchnorm_demo"
path = "examples/batchnorm_demo.rs"
[[example]]
name = "boston_housing_regression"
path = "examples/boston_housing_regression.rs"
[[example]]
name = "broadcasting_demo"
path = "examples/broadcasting_demo.rs"
[[example]]
name = "cnn_demo"
path = "examples/cnn_demo.rs"
[[example]]
name = "complete_training_demo"
path = "examples/complete_training_demo.rs"
[[example]]
name = "complex_tensor_demo"
path = "examples/complex_tensor_demo.rs"
[[example]]
name = "comprehensive_heavy_benchmark"
path = "examples/comprehensive_heavy_benchmark.rs"
[[example]]
name = "comprehensive_performance_comparison"
path = "examples/comprehensive_performance_comparison.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "debug_leaf_nodes"
path = "examples/debug_leaf_nodes.rs"
[[example]]
name = "debug_linear_layer"
path = "examples/debug_linear_layer.rs"
[[example]]
name = "debug_linear_regression_steps"
path = "examples/debug_linear_regression_steps.rs"
[[example]]
name = "device_specific_heavy_benchmark"
path = "examples/device_specific_heavy_benchmark.rs"
[[example]]
name = "direct_gradient_test"
path = "examples/direct_gradient_test.rs"
[[example]]
name = "distributed_training_demo"
path = "examples/distributed_training_demo.rs"
required-features = []
[[example]]
name = "eigenvalue_demo"
path = "examples/eigenvalue_demo.rs"
required-features = ["linalg"]
[[example]]
name = "embedding_demo"
path = "examples/embedding_demo.rs"
[[example]]
name = "extreme_heavy_benchmark"
path = "examples/extreme_heavy_benchmark.rs"
[[example]]
name = "fft_demo"
path = "examples/fft_demo.rs"
[[example]]
name = "fixed_hybrid_benchmark"
path = "examples/fixed_hybrid_benchmark.rs"
[[example]]
name = "focused_comparison_benchmark"
path = "examples/focused_comparison_benchmark.rs"
[[example]]
name = "gpu_kernel_demo"
path = "examples/gpu_kernel_demo.rs"
[[example]]
name = "gpu_neural_engine_benchmark"
path = "examples/hybrid_f32/gpu_neural_engine_benchmark.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "gradient_flow_demo"
path = "examples/gradient_flow_demo.rs"
[[example]]
name = "heavy_comprehensive_benchmark"
path = "examples/heavy_comprehensive_benchmark.rs"
[[example]]
name = "hybrid_error_analysis"
path = "examples/hybrid_error_analysis.rs"
[[example]]
name = "hybrid_f32_demo"
path = "examples/hybrid_f32/demo.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "hybrid_f32_performance_comparison"
path = "examples/hybrid_f32/performance_comparison.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "hybrid_f32_phase1_test"
path = "examples/hybrid_f32/phase1_test.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "hybrid_f32_phase2_test"
path = "examples/hybrid_f32/phase2_test.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "hybrid_f32_phase3_test"
path = "examples/hybrid_f32/phase3_test.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "hybrid_f32_phase4a_test"
path = "examples/hybrid_f32/phase4a_test.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "hybrid_f32_phase4b_test"
path = "examples/hybrid_f32/phase4b_test.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "hybrid_f32_phase4c_test"
path = "examples/hybrid_f32/phase4c_test.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "hybrid_f32_phase5_test"
path = "examples/hybrid_f32/phase5_test.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "hybrid_f32_quick_comparison"
path = "examples/hybrid_f32/quick_comparison.rs"
required-features = ["hybrid-f32"]
[[example]]
name = "linear_regression"
path = "examples/linear_regression.rs"
[[example]]
name = "linear_regression_fixed"
path = "examples/linear_regression_fixed.rs"
[[example]]
name = "matrix_decomposition_demo"
path = "examples/matrix_decomposition_demo.rs"
required-features = ["linalg"]
[[example]]
name = "maximum_load_benchmark"
path = "examples/maximum_load_benchmark.rs"
[[example]]
name = "minimal_debug"
path = "examples/minimal_debug.rs"
[[example]]
name = "mixed_precision_demo"
path = "examples/mixed_precision_demo.rs"
[[example]]
name = "model_formats_demo"
path = "examples/model_formats_demo.rs"
[[example]]
name = "model_hub_demo"
path = "examples/model_hub_demo.rs"
required-features = ["model-hub"]
[[example]]
name = "modern_architectures_demo"
path = "examples/modern_architectures_demo.rs"
[[example]]
name = "neural_network_demo"
path = "examples/neural_network_demo.rs"
[[example]]
name = "phase8_demo"
path = "examples/phase8_demo.rs"
[[example]]
name = "profiler_demo"
path = "examples/profiler_demo.rs"
[[example]]
name = "quick_extreme_benchmark"
path = "examples/quick_extreme_benchmark.rs"
[[example]]
name = "quick_validation_benchmark"
path = "examples/quick_validation_benchmark.rs"
[[example]]
name = "readme_basic_usage_demo"
path = "examples/readme_basic_usage_demo.rs"
[[example]]
name = "simple_autograd_test"
path = "examples/simple_autograd_test.rs"
[[example]]
name = "smart_fallback_benchmark"
path = "examples/smart_fallback_benchmark.rs"
[[example]]
name = "special_functions_demo"
path = "examples/special_functions_demo.rs"
[[example]]
name = "svd_demo"
path = "examples/svd_demo.rs"
required-features = ["linalg"]
[[example]]
name = "tensor_nd_demo"
path = "examples/tensor_nd_demo.rs"
[[example]]
name = "tensorboard_demo"
path = "examples/tensorboard_demo.rs"
[[example]]
name = "test_actual_download"
path = "examples/test_actual_download.rs"
required-features = ["model-hub"]
[[example]]
name = "vision_pipeline_demo"
path = "examples/vision_pipeline_demo.rs"
[[example]]
name = "visualization_demo"
path = "examples/visualization_demo.rs"
[[example]]
name = "wasm_complete_pipeline"
path = "examples/wasm_complete_pipeline.rs"
[[example]]
name = "wasm_demo"
path = "examples/wasm_demo.rs"
[[example]]
name = "wasm_enhanced_demo"
path = "examples/wasm_enhanced_demo.rs"
[[example]]
name = "wasm_quality_simple"
path = "examples/wasm_quality_simple.rs"
[[example]]
name = "webgpu_chrome_demo"
path = "examples/webgpu_chrome_demo.rs"
required-features = ["webgpu"]
[[example]]
name = "webgpu_jupyter_demo"
path = "examples/webgpu_jupyter_demo.rs"
[[example]]
name = "webgpu_simple_demo"
path = "examples/webgpu_simple_demo.rs"
required-features = ["webgpu"]
[features]
blas-optimized = ["dep:blas", "dep:lapack", "dep:openblas-src", "dep:cblas-sys"]
ci-fast = []
coreml = ["dep:objc2-core-ml", "dep:objc2-foundation", "dep:metal"]
coreml-fallback = ["coreml-hybrid"]
coreml-hybrid = ["coreml", "metal", "cuda"]
cuda = ["dep:cudarc", "dep:bytemuck"]
default = []
hybrid-f32 = ["metal", "coreml", "mac-hybrid"]
linalg = ["dep:ndarray-linalg", "dep:openblas-src", "dep:cblas-sys"]
linalg-system = ["dep:ndarray-linalg", "dep:blas", "dep:lapack"]
mac-hybrid = ["metal", "coreml"]
memory-debug = []
metal = ["dep:metal", "dep:objc"]
model-hub = ["dep:reqwest", "dep:futures-util", "dep:tokio", "dep:sha2", "dep:md5", "dep:digest", "dep:dirs", "model-import"]
model-import = ["dep:protobuf", "dep:prost", "dep:prost-derive", "dep:prost-types", "dep:prost-build", "dep:bytes", "dep:base64"]
nccl = ["dep:nccl"]
onnx = ["dep:ort"]
opencl = ["dep:opencl3"]
python = ["dep:pyo3", "dep:numpy"]
safetensors = ["dep:safetensors", "dep:memmap2", "dep:bytemuck"]
wasm = ["wasm-bindgen", "wasm-bindgen-futures", "web-sys", "js-sys", "console_error_panic_hook", "getrandom/js"]
wasm-safe = []
webgpu = ["wasm", "dep:wgpu", "dep:wgpu-hal", "dep:wgpu-core", "dep:wgpu-types", "dep:bytemuck"]
[lib]
crate-type = ["cdylib", "rlib"]
name = "rustorch"
path = "src/lib.rs"
[lints.clippy]
approx_constant = "allow"
identity_op = "allow"
needless_borrow = "allow"
needless_borrows_for_generic_args = "allow"
needless_range_loop = "allow"
println_empty_string = "allow"
redundant_closure = "allow"
unit_arg = "allow"
unnecessary_cast = "allow"
useless_asref = "allow"
useless_vec = "allow"
[package]
authors = ["Jun Suzuki <jun.suzuki.japan@gmail.com>"]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = "build.rs"
categories = ["science", "algorithms"]
description = "Production-ready PyTorch-compatible deep learning library in Rust with special mathematical functions (gamma, Bessel, error functions), statistical distributions, Fourier transforms (FFT/RFFT), matrix decomposition (SVD/QR/LU/eigenvalue), automatic differentiation, neural networks, computer vision transforms, complete GPU acceleration (CUDA/Metal/OpenCL), SIMD optimizations, parallel processing, WebAssembly browser support, comprehensive distributed learning support, and performance validation"
documentation = "https://docs.rs/rustorch"
edition = "2021"
homepage = "https://github.com/JunSuzukiJapan/rustorch"
keywords = ["pytorch", "machine-learning", "tensor", "fft", "matrix-decomposition"]
license = "MIT OR Apache-2.0"
name = "rustorch"
readme = "README.md"
repository = "https://github.com/JunSuzukiJapan/rustorch"
version = "0.6.29"
[package.metadata.docs.rs]
features = ["wasm", "model-import", "safetensors"]
rustdoc-args = ["--cfg", "docsrs", "--allow", "rustdoc::broken_intra_doc_links"]
[package.metadata.rust-analyzer.cargo]
all_features = true
[profile.release]
codegen-units = 1
lto = true
opt-level = 3
[profile.wasm]
inherits = "release"
lto = true
opt-level = "z"
panic = "abort"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.blas]
optional = true
version = "0.22"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.cblas-sys]
optional = true
version = "0.1"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.hostname]
version = "0.4"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.lapack]
optional = true
version = "0.19"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.openblas-src]
features = ["cblas", "system"]
optional = true
version = "0.10"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.criterion]
features = ["html_reports"]
version = "0.5"
[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
features = ["js"]
version = "0.2"
[target.'cfg(target_arch = "wasm32")'.dependencies.web-time]
version = "1.1"
[target.'cfg(target_os = "macos")'.dependencies.objc_exception]
optional = true
version = "0.1"
[[test]]
name = "advanced_optimizer_tests"
path = "tests/advanced_optimizer_tests.rs"
[[test]]
name = "basic_profiler_test"
path = "tests/basic_profiler_test.rs"
[[test]]
name = "basic_validation_test"
path = "tests/basic_validation_test.rs"
[[test]]
name = "cross_platform_test"
path = "tests/cross_platform_test.rs"
[[test]]
name = "data_validation_tests"
path = "tests/data_validation_tests.rs"
[[test]]
name = "debug_system_tests"
path = "tests/debug_system_tests.rs"
[[test]]
name = "distributed_tests"
path = "tests/distributed_tests.rs"
[[test]]
name = "dynamic_execution_test"
path = "tests/dynamic_execution_test.rs"
[[test]]
name = "f32_tensor_basic_test"
path = "tests/f32_tensor_basic_test.rs"
[[test]]
name = "gpu_operations_test"
path = "tests/gpu_operations_test.rs"
[[test]]
name = "hybrid_f32_core_tests"
path = "tests/hybrid_f32_core_tests.rs"
[[test]]
name = "hybrid_f32_minimal_test"
path = "tests/hybrid_f32_minimal_test.rs"
[[test]]
name = "hybrid_f32_phase1_tests"
path = "tests/hybrid_f32_phase1_tests.rs"
[[test]]
name = "hybrid_f32_phase2_tests"
path = "tests/hybrid_f32_phase2_tests.rs"
[[test]]
name = "hybrid_f32_phase3_tests"
path = "tests/hybrid_f32_phase3_tests.rs"
[[test]]
name = "hybrid_f32_pytorch_api_tests"
path = "tests/hybrid_f32_pytorch_api_tests.rs"
[[test]]
name = "hybrid_f32_tests"
path = "tests/hybrid_f32_tests.rs"
[[test]]
name = "multi_gpu_basic_validation"
path = "tests/multi_gpu_basic_validation.rs"
[[test]]
name = "multi_gpu_operations_test"
path = "tests/multi_gpu_operations_test.rs"
[[test]]
name = "optimizer_tests"
path = "tests/optimizer_tests.rs"
[[test]]
name = "phase4_integration_tests"
path = "tests/phase4_integration_tests.rs"
[[test]]
name = "phase9_serialization_tests"
path = "tests/phase9_serialization_tests.rs"
[[test]]
name = "profiler_integration_test"
path = "tests/profiler_integration_test.rs"
[[test]]
name = "python_bindings_tests"
path = "tests/python_bindings_tests.rs"
[[test]]
name = "pytorch_compatibility"
path = "tests/pytorch_compatibility.rs"
[[test]]
name = "test_basic_operations"
path = "tests/test_basic_operations.rs"
[[test]]
name = "test_phase5_dataloader"
path = "tests/test_phase5_dataloader.rs"
[[test]]
name = "unified_backend_integration"
path = "tests/unified_backend_integration.rs"
[[test]]
name = "wasm_integration_tests"
path = "tests/wasm_integration_tests.rs"
[[test]]
name = "wasm_tests"
path = "tests/wasm_tests.rs"