Files
raea/systems/index/Cargo.toml
shinyobjectz c218ecfcdb Windows: raea starts on a processor without AVX2 (#110)
On an Intel Core i5-3550 (Ivy Bridge, 2012) raea.exe stopped at once with 0xC000001D, an illegal instruction, whatever it was asked. Intel's Software Development Emulator, running rc8's raea.exe --version as an Ivy Bridge, named the instruction: a shlx (BMI2) in the C++ library's unordered_map rehash, called from a static initializer that fills ONNX's set of experimental operators (ATen, Affine, ConstantFill, Crop). It was the static ONNX Runtime that ort downloads and links, built with AVX2. Its initializers run before main, so no path of raea's could avoid them: every CPU without AVX2 and BMI2 (an Intel Core before 2013, many Celerons and Pentiums) stopped there. With the emulator told to report and carry on, all 8 such instructions in raea --version lay in that library's code.

On Windows x64, ort now loads ONNX Runtime when a model first runs (load-dynamic), from onnxruntime.dll beside the executable, and links none of it. raea.exe and raea-perceive.exe are the two that used it; the hosts never did.

- systems/{ml,song,columns,speech,index}: ort's load-dynamic on Windows x64, in each crate that uses ort, since raea, raea-perceive and the hosts build in separate cargo runs (checked with cargo tree: disable-linking in both). The crates compile with it (checked on the Mac target; ring's C can't build for Windows here).
- tools/release/onnxruntime.sh: Microsoft's own build, Microsoft.ML.OnnxRuntime 1.28.0 from NuGet (the version the static build was; MIT), checked against its pinned sha256 (its sha512 matches NuGet's record), with its LICENSE and ThirdPartyNotices.txt. Under the emulator as an Ivy Bridge and a Sandy Bridge it loads, makes an environment and opens raea's beat model.
- release.yml runs it in the Windows job on both the built and the promoted paths, and lists the DLL's imports; release.sh packs the three files and refuses a build without them.
- release-check.sh allows that one DLL of Microsoft's, by name, and requires it and its licence in a Windows zip. Its song check (raea song) runs ONNX Runtime from the unpacked zip on every release.
- What's new for 0.1.8 says so.
2026-11-19 08:12:54 -08:00

48 lines
3.3 KiB
TOML

[package]
name = "raea-sys-index"
version = "0.1.0"
edition = "2024"
license = "FSL-1.1-ALv2"
publish = false
description = "Index's fast pass (docs/index.feature IX1-IX3): every picture, and a few frames of every video, listed, decoded from its small copy and embedded by SigLIP 2 on the Neural Engine, kept as f16 rows beside a SQLite list, and searched by words through SigLIP 2's text tower"
[dependencies]
anyhow = "1"
dunce = "1"
half = "2"
rayon = "1"
rusqlite = { version = "0.37", features = ["bundled"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# the text tower: ONNX on ONNX Runtime's CPU kernels, as raea's other encoders
raea-sys-ml = { path = "../ml" }
# the models folder and the index home, as raea names them
raea-io-home = { path = "../../io/home" }
ort = { version = "=2.0.0-rc.13", features = ["half"] }
tokenizers = { version = "0.23", default-features = false, features = ["onig"] }
walkdir = "2"
[target.'cfg(target_vendor = "apple")'.dependencies]
objc2 = "0.6"
objc2-foundation = { version = "0.3", features = ["NSString", "NSURL", "NSError", "NSDictionary", "NSArray", "NSValue", "NSDate"] }
objc2-core-foundation = { version = "0.3", features = ["CFString", "CFDictionary", "CFNumber", "CFURL", "CFData"] }
objc2-core-ml = { version = "0.3", features = ["MLModel", "MLModelConfiguration", "MLFeatureProvider", "MLDictionaryFeatureProvider", "MLFeatureValue", "MLMultiArray", "MLModel_MLModelCompilation", "MLArrayBatchProvider", "MLBatchProvider", "objc2-core-video"] }
objc2-core-video = { version = "0.3", features = ["CVPixelBuffer", "CVImageBuffer", "CVBuffer", "CVReturn"] }
objc2-core-graphics = { version = "0.3", features = ["CGImage", "CGColorSpace", "CGContext", "CGBitmapContext"] }
objc2-image-io = { version = "0.3", features = ["CGImageSource", "CGImageDestination", "CGImageProperties"] }
# a video's keyframes (frames.rs)
objc2-av-foundation = { version = "0.3", features = ["objc2-core-media", "objc2-core-graphics"] }
objc2-core-media = "0.3"
# Apple Photos (photos.rs): its assets and the small copies it keeps of each, so iCloud Photos indexes from this Mac
objc2-photos = { version = "0.3", default-features = false, features = ["std", "block2", "objc2-core-foundation", "objc2-app-kit", "PHAsset", "PHFetchResult", "PHFetchOptions", "PHImageManager", "PHPhotoLibrary", "PHAssetResource", "PhotosTypes", "PHObject"] }
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "NSImage", "NSImageRep", "NSGraphicsContext", "objc2-core-graphics"] }
block2 = "0.6"
# a file kept only in iCloud (cloud.rs): its picture from Quick Look, without downloading the original
objc2-quick-look-thumbnailing = { version = "0.3", default-features = false, features = ["std", "block2", "objc2-core-foundation", "objc2-core-graphics", "QLThumbnailGenerator", "QLThumbnailGenerationRequest", "QLThumbnailRepresentation"] }
# Windows x64: ONNX Runtime is loaded from onnxruntime.dll beside the executable when a model first runs, never linked
# in (#110; tools/release/onnxruntime.sh ships Microsoft's build). The static runtime ort downloads is built for AVX2, and
# its static initializers ran before main, so raea.exe stopped at start on any CPU without AVX2 or BMI2.
[target.'cfg(all(windows, target_arch = "x86_64"))'.dependencies]
ort = { version = "=2.0.0-rc.13", features = ["load-dynamic"] }