RuntimeError: Conv1D on CPU currently requires the oneDNN library (a.k.a. DNNL) which is not integrated in this build

Hi.
I use ctranslate2 on m2 mac. The whisper model depends on Conv1D op, which does not support mac apple Silicon.

How to solve it.

Thanks.

Hi,

oneDNN is currently not included in the macOS Python wheels. See how CTranslate2 is built for macOS here: CTranslate2/prepare_build_environment_macos.sh at master · OpenNMT/CTranslate2 · GitHub

It should be easy to build against oneDNN for macOS x64 but I’m not sure about ARM64. oneDNN uses the ARM Compute Library for ARM processors. We should check if both of these libraries can be easily cross-compiled to ARM64. If not, we should consider an alternative implementation for the Conv1D op.

I created an issue to track the progress:

Thanks. By the way, can the model on macOS benefit from the MPS backend?

I don’t know, maybe? I don’t have a Mac so I can’t work effectively on macOS specific backends at the moment.

Note that the latest version 3.2.0 includes a basic Conv1D implementation that can run on macOS ARM64.