rustorch 0.6.29

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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# RusTorch CoreML Integration - Rust Kernel\n",
    "\n",
    "Dieses Notebook zeigt, wie Sie CoreML mit RusTorch verwenden.\n",
    "Dies läuft auf dem Rust-Kernel."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Erforderliche Abhängigkeiten und Features prüfen"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "// Grundlegende RusTorch-Verwendung\n",
    "extern crate rustorch;\n",
    "\n",
    "use rustorch::tensor::Tensor;\n",
    "use rustorch::gpu::DeviceType;\n",
    "\n",
    "println!(\"RusTorch Version: {}\", env!(\"CARGO_PKG_VERSION\"));\n",
    "println!(\"Rust Version: {}\", env!(\"RUSTC_VERSION\"));"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## CoreML-Verfügbarkeit prüfen\n",
    "\n",
    "Prüfen Sie, ob CoreML auf dem aktuellen System verfügbar ist."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#[cfg(any(feature = \"coreml\", feature = \"coreml-hybrid\", feature = \"coreml-fallback\"))]\n",
    "{\n",
    "    use rustorch::backends::DeviceManager;\n",
    "    \n",
    "    let coreml_available = DeviceManager::is_coreml_available();\n",
    "    println!(\"CoreML verfügbar: {}\", coreml_available);\n",
    "    \n",
    "    if coreml_available {\n",
    "        println!(\"🎉 CoreML ist verfügbar!\");\n",
    "        println!(\"Platform: macOS\");\n",
    "    } else {\n",
    "        println!(\"⚠️ CoreML ist nicht verfügbar\");\n",
    "        println!(\"Bitte verwenden Sie CPU oder andere GPU-Backends\");\n",
    "    }\n",
    "}\n",
    "\n",
    "#[cfg(not(any(feature = \"coreml\", feature = \"coreml-hybrid\", feature = \"coreml-fallback\")))]\n",
    "{\n",
    "    println!(\"❌ CoreML-Features sind nicht aktiviert\");\n",
    "    println!(\"Bitte mit --features coreml erstellen\");\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Zusammenfassung\n",
    "\n",
    "Dieses Notebook demonstrierte folgende Punkte:\n",
    "\n",
    "1. ✅ **CoreML-Verfügbarkeitsprüfung**: Prüfung, ob CoreML auf dem System verfügbar ist\n",
    "2. ✅ **Grundlegende Tensor-Operationen**: Matrixmultiplikation auf CPU\n",
    "3. ✅ **CoreML-Backend**: CoreML-Backend-Initialisierung falls verfügbar\n",
    "4. ✅ **Intelligente Geräteauswahl**: Optimale Geräteauswahl basierend auf Operationscharakteristika\n",
    "\n",
    "### Nächste Schritte\n",
    "\n",
    "- Implementierung komplexerer neuronaler Netzwerkoperationen\n",
    "- Performance-Vergleich (CPU vs CoreML vs Metal)\n",
    "- Integration mit tatsächlichen CoreML-Modellen\n",
    "\n",
    "### Hinweise\n",
    "\n",
    "- CoreML ist nur auf macOS verfügbar\n",
    "- Einige Operationen werden von CoreML nicht unterstützt und fallen automatisch auf CPU oder andere GPU zurück\n",
    "- Die Performance variiert je nach spezifischer Hardware und Operationstypen"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {\n   \"display_name\": \"Rust\",\n   \"language\": \"rust\",\n   \"name\": \"rust\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": \"rust\",\n   \"file_extension\": \".rs\",\n   \"mimetype\": \"text/rust\",\n   \"name\": \"Rust\",\n   \"pygment_lexer\": \"rust\",\n   \"version\": \"\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}