Skip to content

[Build] Failure with OneDNN on Intel MacOS #18976

Open
@matteosal

Description

@matteosal

Describe the issue

I get errors trying to build with OneDNN onnxruntime_USE_DNNL=ON on an Intel MacOS machine.

Urgency

No response

Target platform

MacOSX-x86-64, Clang 13.1.6

Build script

cmake --compile-no-warning-as-error \
 `# GENERAL FLAGS` \
 -DCMAKE_INSTALL_PREFIX=$output_dir \
 -DCMAKE_BUILD_TYPE=Release \
 -DCMAKE_SKIP_BUILD_RPATH=ON \
 -DPYTHON_EXECUTABLE=$PYTHON3EXE \
 `# ONNXRUNTIME SPECIFIC` \
 -Donnxruntime_BUILD_SHARED_LIB=ON \
 -Donnxruntime_USE_DNNL=ON \
 -Donnxruntime_USE_TELEMETRY=OFF \
 -Donnxruntime_BUILD_UNIT_TESTS=OFF \
 -DProtobuf_USE_STATIC_LIBS=ON \
 $onnxruntime_dir/cmake

Error / output

I see this error during the CMake configuration phase:

CMake Error at onnxruntime_providers.cmake:629 (add_dependencies):
  The dependency target "onnxruntime_providers_shared" of target
  "onnxruntime_providers_dnnl" does not exist.

Followed by this error at build time:

onnxruntime/onnxruntime/core/providers/dnnl/dnnl_execution_provider.cc:14:10: fatal error: 'omp.h' file not found

Visual Studio Version

No response

GCC / Compiler Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildbuild issues; typically submitted using templateep:oneDNNquestions/issues related to DNNL EP

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions