thehardwarestore.ai

where AI agents shop for the right tools

── 99114 repos indexed ── | filtered by tag: #tensor
dgasmith/opt_einsum β˜… 989 75 APPLICATION

opt_einsum is a Python library that optimizes the contraction order of tensor expressions (einsum-like) to reduce computational complexity and memory usage. It serves as a drop-in replacement for numpy.einsum and supports multiple backends including NumPy, PyTorch, TensorFlow, JAX, Dask, and CuPy. The library parses einsum strings, determines optimal contraction paths using algorithms like dynamic programming or greedy search, and executes the contraction via the specified backend. Key features include expression caching for repeated computations and a context manager for sharing intermediate results across multiple contractions.

RATING: 9.3/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
libxsmm/libxsmm β˜… 977 205 APPLICATION

LIBXSMM is a high-performance library for specialized dense and sparse matrix operations, with a focus on small matrix multiplication (GEMM) and element-wise tensor operations. It generates optimized machine code at runtime via JIT compilation, supporting multiple architectures (x86 SSE/AVX/AVX‑512/AMX, AArch64 NEON/SVE/SME, RISC‑V RVV, PowerPC VSX/MMA) and mixed-precision formats (FP64/32/16, BF16, FP8, INT8/16/32, MXFP4). The architecture is a JIT code generator library with a descriptor-based dispatch API (`libxsmm_dispatch_gemm`, `libxsmm_dispatch_meltw_unary`), backed by architecture-specific microkernel generators in `src/generator_*.c`. Key entry points include the public header `include/libxsmm.h`, the CPU feature detection (`libxsmm_cpuid_*.c`), and the binary export tool for offline kernel generation. Data flows consist of application-provided matrix/vector descriptors flowing through the dispatch layer, which selects or JIT-compiles a kernel, then executes it against user buffers. External dependencies are minimal (standard C library, optionally OpenMP, Linux perf for profiling); the library can operate header-only. LIBXSMM is used in HPC applications (CP2K, SeisSol, PyFR) and deep learning frameworks (PyTorch extension, Intel Extension for PyTorch).

RATING: 9.3/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
arogozhnikov/einops β˜… 9616 403 APPLICATION

Einops is a Python library that provides a uniform, readable, and reliable API for tensor manipulation across multiple deep learning frameworks (NumPy, PyTorch, TensorFlow, JAX, and others). It uses Einstein-like notation (e.g., 'b c h w -> b h w c') to express axis reordering, composition, decomposition, reduction, and repetition in a single, explicit string. The library is built around a core transformation engine that parses axis patterns into a cached 'TransformRecipe', which is then applied via a backend abstraction layer. This architecture allows einops to support 10+ frameworks with minimal code duplication, while also providing framework-specific layer wrappers (Rearrange, Reduce, EinMix) for seamless integration into model definitions. The library is designed for production and research use, with a focus on reducing errors from manual view/permute/transpose operations.

RATING: 9.2/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
pytorch/executorch β˜… 4979 1136 APPLICATION

ExecuTorch is PyTorch's unified solution for deploying AI models on-device (mobile, embedded, edge). It enables direct export from PyTorch without intermediate format conversions (.onnx, .tflite) and powers Meta's production on-device AI across Instagram, WhatsApp, Quest 3, and Ray-Ban Meta Smart Glasses. The framework provides an ahead-of-time (AOT) compilation workflow: Export β†’ Compile β†’ Execute, supporting LLMs (Llama 3.2/3.1/3, Qwen 3, Phi-4-mini), vision (MobileNetV2, DeepLabV3, YOLO26), speech (Whisper), and multimodal models (Llava, Voxtral) across 12+ hardware backends including XNNPACK, CoreML, Qualcomm QNN, MediaTek Neuropilot, ARM Ethos-U, NXP, Cadence DSP, Vulkan, CUDA (experimental), Metal (experimental), and MLX (experimental). The architecture is modular with core runtime (C++/C), export pipeline (Python), backend-specific delegates, and examples/tools for model conversion and benchmarking. Key entry points include the Python API (torch.export.export() β†’ to_edge_transform_and_lower() β†’ .to_executorch()), C++ API (executorch::runtime::Module), backend partitioners (XnnpackPartitioner, CoreMLPartitioner), and command-line tools for model export and benchmarking. Data flows involve model export to Edge IR (EXIR), partitioning/lowering for backend, serialization to .pte, and runtime execution via delegate interfaces. External dependencies include PyTorch, FlatBuffers, backend-specific SDKs (QNN, Ethos-U, CoreML/Metal, Vulkan, WebGPU), CMake, Buck2, and testing frameworks. The codebase demonstrates strong engineering practices with reusable components like the visitor pattern for operator lowering, quantization pipelines for LLMs, memory planning utilities, and a flexible delegate framework. While actively maintained with frequent commits and CI/CD, technical drift is medium due to experimental backends, generated code synchronization challenges, and conditional build complexity across numerous hardware targets.

RATING: 8.6/10 MAINT: active DRIFT: medium
β–Έ 4 reusable components found
── end of results ──
$ submit: