cmake_minimum_required (VERSION 3.13) project (winograd LANGUAGES C CXX) set_property(GLOBAL PROPERTY C_STANDARD 11) set_property(GLOBAL PROPERTY CXX_STANDARD 11) # General flags set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp -O3 -march=native") set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}") # Add source to this project's executable. add_executable (run_winograd_f6x3 "driver.c" "winograd_f6x3.cpp" "winograd_f6x3.h") add_executable (run_dnnl_winograd "driver.c" "winograd_dnnl.cpp") add_executable (run_dnnl_direct "driver.c" "winograd_dnnl.cpp") # oneDNN set(DNNLROOT "$ENV{HOME}/intel/oneapi/dnnl/latest/cpu_gomp") include_directories(${DNNLROOT}/include) target_link_libraries(run_dnnl_winograd ${DNNLROOT}/lib/libdnnl.so) target_link_libraries(run_dnnl_direct ${DNNLROOT}/lib/libdnnl.so) # dnnl_winograd specific target_compile_definitions(run_dnnl_winograd PUBLIC WINOGRAD) # Add source to libraries add_library(winograd_f6x3 SHARED "driver.c" "winograd_f6x3.cpp" "winograd_f6x3.h") add_library(dnnl_winograd SHARED "winograd_dnnl.cpp") add_library(dnnl_direct SHARED "winograd_dnnl.cpp") target_link_libraries(dnnl_winograd ${DNNLROOT}/lib/libdnnl.so) target_link_libraries(dnnl_direct ${DNNLROOT}/lib/libdnnl.so) target_compile_definitions(dnnl_winograd PUBLIC WINOGRAD)