Memory stride warning when loading CoreML models on ANE

When I am doing an uncached load of CoreML model on ANE, I received this warning in Xcode console

Type of hiddenStates in function main's I/O contains unknown strides. Using unknown strides for MIL tensor buffers with unknown shapes is not recommended in E5ML. Please use row_alignment_in_bytes property instead. Refer to https://e5-ml.apple.com/more-info/memory-layouts.html for more information.

However, the web link does not seem to be working. Where can I find more information about about this and how can I fix it?

This particular message appears to come from one of the underlying private frameworks. (You can check the metadata of the message using log stream command.)

You can safely ignore it unless you have some real problems.

The other reply is correct that you can often ignore this warning, but I wanted to add some context since I have spent time debugging stride alignment issues with CoreML on ANE. The warning about "unknown strides" means that your model's hiddenStates tensor does not specify a memory layout that the E5ML compiler (the ANE backend) can optimize for. The ANE hardware has strict alignment requirements — specifically, the last axis of a tensor buffer needs to be aligned to 64 bytes (or 32 bytes on older chips).

If your model runs correctly and produces accurate outputs, the warning is cosmetic — the runtime falls back to a compatible layout automatically. However, you may be leaving performance on the table. In my testing with speech models, fixing stride alignment reduced ANE inference latency by 15-25% because the hardware could use its native tiling strategy instead of the fallback path.

When converting your model to CoreML (via coremltools), you can specify the output tensor's memory layout explicitly: import coremltools as ctmodel = ct.convert( your_model, compute_units=ct.ComputeUnit.ALL,) For the hiddenStates output specifically, ensure the tensor shape has its last dimension as a multiple of 16 (for FP16) or 32 (for FP32). If your hidden dimension is something like 768, you are fine — it divides evenly. If it is something like 257, pad it to 272 (next multiple of 16). You can verify whether your model is actually running on ANE by checking the MLComputePlan API (available in macOS 26+) or by profiling with Instruments → CoreML template. If the model silently falls back to GPU or CPU due to stride issues, that is when this warning becomes a real performance problem. The dead link in the warning (e5-ml.apple.com) is an internal Apple URL that leaked into the diagnostic message — it is not meant to be publicly accessible.

Memory stride warning when loading CoreML models on ANE
 
 
Q