Commit 2a72a179 authored by Artur Wojcik's avatar Artur Wojcik
Browse files

temp2

parent d55f671d
...@@ -97,128 +97,7 @@ FetchContent_MakeAvailable(HALF nlohmann_json protobuf msgpack blaze) ...@@ -97,128 +97,7 @@ FetchContent_MakeAvailable(HALF nlohmann_json protobuf msgpack blaze)
set(BUILD_SHARED_LIBS ${__build_shared_libs} CACHE BOOL "" FORCE) set(BUILD_SHARED_LIBS ${__build_shared_libs} CACHE BOOL "" FORCE)
if(MIGRAPHX_ENABLE_CPU) if(MIGRAPHX_ENABLE_CPU)
if(MIGRAPHX_ENABLE_ZENDNN) if(NOT MIGRAPHX_ENABLE_ZENDNN)
set(ZENDNN_BUILD_TESTS OFF CACHE INTERNAL "")
set(ZENDNN_USE_LOCAL_BLIS OFF CACHE INTERNAL "")
set(ZENDNN_USE_LOCAL_LIBM OFF CACHE INTERNAL "")
FetchContent_Declare(
zendnn
GIT_REPOSITORY https://github.com/amd/ZenDNN.git
GIT_TAG v4.0
SYSTEM)
set(AOCL_BLIS_FAMILY amdzen CACHE INTERNAL "")
set(ENABLE_BLAS ON CACHE INTERNAL "")
set(ENABLE_MULTITHREADING ON CACHE INTERNAL "")
FetchContent_Declare(
blis
GIT_REPOSITORY https://github.com/apwojcik/aocl-blis.git
GIT_TAG aocl_4.0
SYSTEM)
FetchContent_MakeAvailable(zendnn blis)
FetchContent_GetProperties(blis)
set(__blis_include_directories
${blis_BINARY_DIR}
${blis_SOURCE_DIR}/aocl_dtl
${blis_SOURCE_DIR}/frame/0
${blis_SOURCE_DIR}/frame/0/copysc
${blis_SOURCE_DIR}/frame/1
${blis_SOURCE_DIR}/frame/1d
${blis_SOURCE_DIR}/frame/1m
${blis_SOURCE_DIR}/frame/1m/packm
${blis_SOURCE_DIR}/frame/1m/unpackm
${blis_SOURCE_DIR}/frame/1f
${blis_SOURCE_DIR}/frame/2
${blis_SOURCE_DIR}/frame/2/gemv
${blis_SOURCE_DIR}/frame/2/ger
${blis_SOURCE_DIR}/frame/2/hemv
${blis_SOURCE_DIR}/frame/2/her
${blis_SOURCE_DIR}/frame/2/her2
${blis_SOURCE_DIR}/frame/2/symv
${blis_SOURCE_DIR}/frame/2/syr
${blis_SOURCE_DIR}/frame/2/syr2
${blis_SOURCE_DIR}/frame/2/trmv
${blis_SOURCE_DIR}/frame/2/trsv
${blis_SOURCE_DIR}/frame/3
${blis_SOURCE_DIR}/frame/3/gemm
${blis_SOURCE_DIR}/frame/3/gemmt
${blis_SOURCE_DIR}/frame/3/gemm/ind
${blis_SOURCE_DIR}/frame/3/hemm/
${blis_SOURCE_DIR}/frame/3/herk/
${blis_SOURCE_DIR}/frame/3/her2k/
${blis_SOURCE_DIR}/frame/3/symm/
${blis_SOURCE_DIR}/frame/3/syrk/
${blis_SOURCE_DIR}/frame/3/syr2k/
${blis_SOURCE_DIR}/frame/3/trmm/
${blis_SOURCE_DIR}/frame/3/trmm3/
${blis_SOURCE_DIR}/frame/3/trsm/
${blis_SOURCE_DIR}/frame/base
${blis_SOURCE_DIR}/frame/base/cast
${blis_SOURCE_DIR}/frame/base/check
${blis_SOURCE_DIR}/frame/base/noopt
${blis_SOURCE_DIR}/frame/base/proj
${blis_SOURCE_DIR}/frame/compat
${blis_SOURCE_DIR}/frame/compat/attic
${blis_SOURCE_DIR}/frame/compat/cblas
${blis_SOURCE_DIR}/frame/compat/cblas/f77_sub
${blis_SOURCE_DIR}/frame/compat/check
${blis_SOURCE_DIR}/frame/compat/f2c
${blis_SOURCE_DIR}/frame/compat/f2c/util
${blis_SOURCE_DIR}/frame/include
${blis_SOURCE_DIR}/frame/include/level0
${blis_SOURCE_DIR}/frame/include/level0/1e
${blis_SOURCE_DIR}/frame/include/level0/1m
${blis_SOURCE_DIR}/frame/include/level0/1r
${blis_SOURCE_DIR}/frame/include/level0/bb
${blis_SOURCE_DIR}/frame/include/level0/io
${blis_SOURCE_DIR}/frame/include/level0/ri
${blis_SOURCE_DIR}/frame/include/level0/ri3
${blis_SOURCE_DIR}/frame/include/level0/rih
${blis_SOURCE_DIR}/frame/include/level0/ro
${blis_SOURCE_DIR}/frame/include/level0/rpi
${blis_SOURCE_DIR}/frame/ind
${blis_SOURCE_DIR}/frame/ind/cntx
${blis_SOURCE_DIR}/frame/ind/oapi
${blis_SOURCE_DIR}/frame/ind/tapi
${blis_SOURCE_DIR}/frame/util
${blis_SOURCE_DIR}/frame/thread)
set(__zendnn_compile_options
-fdelayed-template-parsing
-fms-extensions
-fms-compatibility)
target_compile_options(amdZenDNN
PRIVATE
${__zendnn_compile_options})
target_compile_options(amdZenDNN_common
PRIVATE
${__zendnn_compile_options})
target_compile_definitions(amdZenDNN_common PRIVATE -D_AMD64_)
target_include_directories(amdZenDNN_common
SYSTEM PRIVATE
${__blis_include_directories})
target_compile_options(amdZenDNN_cpu
PRIVATE
${__zendnn_compile_options})
target_include_directories(amdZenDNN_cpu
SYSTEM PRIVATE
${__blis_include_directories})
target_compile_options(amdZenDNN_cpu_x64
PRIVATE
${__zendnn_compile_options})
target_compile_definitions(amdZenDNN_cpu_x64 PRIVATE -D_AMD64_)
target_include_directories(amdZenDNN_cpu_x64
SYSTEM PRIVATE
${__blis_include_directories})
unset(__zendnn_compile_options)
else()
set(DNNL_BUILD_TESTS OFF CACHE INTERNAL "") set(DNNL_BUILD_TESTS OFF CACHE INTERNAL "")
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
......
...@@ -56,16 +56,14 @@ add_library(migraphx_cpu ...@@ -56,16 +56,14 @@ add_library(migraphx_cpu
set_target_properties(migraphx_cpu PROPERTIES EXPORT_NAME cpu) set_target_properties(migraphx_cpu PROPERTIES EXPORT_NAME cpu)
rocm_set_soversion(migraphx_cpu ${MIGRAPHX_SO_VERSION}) rocm_set_soversion(migraphx_cpu ${MIGRAPHX_SO_VERSION})
set(MIGRAPHX_ENABLE_ZENDNN Off CACHE BOOL "") option(MIGRAPHX_ENABLE_ZENDNN "" OFF)
if(NOT WIN32) if(MIGRAPHX_ENABLE_ZENDNN)
if(MIGRAPHX_ENABLE_ZENDNN)
find_path(ZENDNN_INC_PATH zendnn.hpp) find_path(ZENDNN_INC_PATH zendnn.hpp)
find_library(ZENDNN_LIB amdZenDNN) find_library(ZENDNN_LIB amdZenDNN)
find_library(BLIS_LIB blis) find_library(BLIS_LIB blis)
else() elif(NOT WIN32)
find_package(dnnl REQUIRED) find_package(dnnl REQUIRED)
endif()
endif() endif()
rocm_clang_tidy_check(migraphx_cpu) rocm_clang_tidy_check(migraphx_cpu)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment