Cargo Features
RusTorch has no features set by default.
[dependencies]
rustorch = { version = "0.6.28", features = ["linalg", "linalg-system", "blas-optimized", "wasm-safe", "cuda", "opencl", "metal", "nccl", "coreml", "coreml-hybrid", "coreml-fallback", "mac-hybrid", "hybrid-f32", "wasm", "webgpu", "model-import", "safetensors", "onnx", "model-hub", "python", "memory-debug", "tempfile", "objc_exception"] }
- default
-
Default features - WASM-compatible
- linalg
-
BLAS-dependent features - High Performance Linear Algebra
Enables cblas-sys ^0.1, ndarray-linalg, and openblas-src
- linalg-system
-
Enables blas ^0.22, lapack ^0.19, and ndarray-linalg
- blas-optimized
-
Enables blas ^0.22, cblas-sys ^0.1, lapack ^0.19, and openblas-src
Affects
optimized_blas::optimized_matmul
… - wasm-safe
-
WASM-safe default with core tensor operations
- cuda coreml-hybrid?
-
Enables bytemuck and cudarc ^0.11
cudarc:
GPU dependencies
Affects
cuda_enhanced::CudaMatrixExecutor
,cuda_kernels::CudaBuffer.slice
,cuda_kernels::CudaKernelExecutor
,cuda_simple::SimpleCudaExecutor
,device::CudaDevice
,device::CudaStream
,cuda::CudaOperations
,hardware::cuda
,gpu_ops::CudaSparseOps
… - opencl
-
Enables opencl3 ^0.9
objc_exception は macOS 専用の依存関係として後で追加します
Affects
device::OpenCLDevice
,device::OpenCLStream
,opencl::OpenCLOperations
,opencl_kernels::OpenClKernelExecutor
,opencl_optimized::OpenClMatrixExecutor
… - metal coreml-hybrid? hybrid-f32? mac-hybrid?
-
Affects
device::MetalDevice
,device::MetalStream
,metal::MetalOperations
,metal_kernels::MetalKernelExecutor
,metal_kernels::metal_relu_f32
,metal_kernels::metal_sigmoid_f32
,metal_kernels::metal_tanh_f32
,metal_kernels::metal_gelu_f32
,metal_kernels::metal_leaky_relu_f32
,metal_kernels::metal_elu_f32
,metal_kernels::metal_swish_f32
,gpu_ops::MetalSparseOps
… - nccl
-
Enables nccl ^0.6
Distributed computing dependencies
Affects
backends::NCCLBackend
,nccl_integration::NCCLCommunicator
,nccl_integration::NCCLUniqueId
,nccl_integration::NCCLBackendOptimized
,nccl_integration::NCCLOptimizations
,nccl_integration::NCCLOps
,nccl_integration::NCCLProfiler
,nccl_integration::TimingGuard
… - coreml coreml-hybrid? hybrid-f32? mac-hybrid?
-
CoreML support for Apple devices
Enables metal, objc2-core-ml ^0.2, and objc2-foundation ^0.2
Affects
model_manager::CoreMLModelHandle.ml_model_meta
,gpu::hybrid_executor
,gpu::coreml
,python::coreml
… - coreml-hybrid coreml-fallback? = coreml, cuda, metal
-
CoreML + GPU hybrid execution
Affects
gpu::hybrid_executor
,gpu::coreml
,python::coreml
… - coreml-fallback = coreml-hybrid
-
Automatic fallback system
Affects
gpu::hybrid_executor
,gpu::coreml
,python::coreml
… - mac-hybrid hybrid-f32? = coreml, metal
-
Mac-hybrid: Intelligent backend selection for macOS (Metal/CoreML)
Automatic Metal/CoreML selection - hybrid-f32 = coreml, mac-hybrid, metal
-
f32統一ハイブリッドシステム(実験的)
f32 unified hybrid system (experimental)Affects
rustorch::hybrid_f32
… - wasm webgpu? = console_error_panic_hook, js-sys, wasm-bindgen, wasm-bindgen-futures, web-sys
-
Enables getrandom ^0.2
Affects
rustorch::wasm
,bindings::WasmLinear
,bindings::WasmConv2d
,bindings::WasmReLU
,bindings::WasmModel
,interop::JsInterop
,interop::init_wasm
,interop::tensor_from_float32_array
,interop::tensor_to_float32_array
,interop::tensor_from_nested_array
,interop::tensor_to_nested_array
,interop::tensor_slice
,interop::BenchmarkResult
,interop::benchmark_matmul
,memory::WasmTensorBuffer
,memory::WasmMemoryMonitor
,runtime::initialize_wasm_runtime
,runtime::WasmPerformance
,runtime::detect_wasm_features
,runtime::WasmLogger
… - webgpu = wasm
-
Enables bytemuck, wgpu ^23.0, wgpu-core ^23.0, wgpu-hal ^23.0, and wgpu-types ^23.0
wgpu:
WebGPU dependencies for Chrome browser GPU acceleration
Affects
backend::WebGPUContext
,backend::WebGPUTensor
,backend::TENSOR_ADD_SHADER
,backend::TENSOR_MUL_SHADER
,backend::TENSOR_MATMUL_SHADER
,backend::TENSOR_RELU_SHADER
,backend::TENSOR_SIGMOID_SHADER
,backend::TENSOR_SOFTMAX_SHADER
,backend::ChromeWebGPUOptimizer
,backend::WebGPUError
,backend::check_webgpu_support
,backend::get_chrome_webgpu_info
,backend::calculate_optimal_workgroups
,backend::estimate_gpu_memory_usage
,simple::WebGPUSimple
,simple::get_browser_webgpu_info
,simple::calculate_performance_estimate
,simple::WebGPUSimpleDemo
,tensor::WebGPUTensorEngine
,tensor::webgpu_tensor_add_f32
… - model-import model-hub?
-
Enables base64 ^0.21, bytes, prost ^0.12, prost-build ^0.12, prost-derive ^0.12, prost-types ^0.12, and protobuf
protobuf:
Model import dependencies
- safetensors
-
Enables bytemuck, memmap2, and safetensors ^0.4
safetensors:
Safetensors and ONNX dependencies
Affects
formats::safetensors
,safetensors::SafetensorsError
,safetensors::SafetensorsLoader
,safetensors::SafetensorsSaver
… - onnx
-
Enables ort
Affects
formats::onnx
,onnx::OnnxError
,onnx::OnnxModel
,onnx::OnnxExporter
,onnx::utils
… - model-hub = model-import
-
Enables reqwest ^0.11
HTTP client for model downloads
sha2:
Cryptographic hashing for model verification
and digest, dirs ^5.0, futures-util, and md5 ^0.7
dirs:
Directory utilities
Affects
rustorch::model_hub
… - python
-
Enables numpy ^0.24 and pyo3 ^0.24.1
pyo3:
Python bindings
Affects
rustorch::python
,python::common
,python::tensor
,python::autograd
,python::nn
,python::optim
,python::data
,python::training
,python::utils
,python::distributed
,python::visualization
,python::error
,python::interop
,python_bindings::PyTensor
,python_bindings::PyVariable
,python_bindings::PyLinear
,python_bindings::PyMSELoss
,python_bindings::PyCrossEntropyLoss
,python_bindings::PyDevice
,python_bindings::PySGD
… - ci-fast memory-debug
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- tempfile implicit feature
-
Enables tempfile
tempfile:
A library for managing temporary files and directories
- wasm-bindgen wasm?
-
Enables wasm-bindgen
WebAssembly dependencies
- wasm-bindgen-futures wasm?
- web-sys wasm?
- js-sys wasm?
- console_error_panic_hook wasm?
- objc_exception mac implicit feature
-
Enables objc_exception
objc_exception:
Rust interface for Objective-C's throw and try/catch statements