Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions projects/miopen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ else()
endif()

# Default installation path
if(NOT WIN32)
if(WIN32)
set(CMAKE_INSTALL_PREFIX $ENV{HIP_PATH})
else()
set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "")
endif()

Expand Down Expand Up @@ -142,7 +144,7 @@ if(NOT WIN32)
check_cxx_linker_flag(-lstdc++fs HAS_LIB_STD_FILESYSTEM)
endif()

list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}/llvm ${CMAKE_INSTALL_PREFIX}/hip /opt/rocm /opt/rocm/llvm /opt/rocm/hip)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}/llvm ${CMAKE_INSTALL_PREFIX}/hip)

option(ENABLE_HIP_WORKAROUNDS Off)
set(MIOPEN_INSTALL_CXX_HEADERS Off CACHE BOOL "Install MIOpen's C++ header interface")
Expand Down Expand Up @@ -182,17 +184,15 @@ if(MIOPEN_EMBED_BUILD)
endif()
endif()

set( MIOPEN_BACKEND ${MIOPEN_DEFAULT_BACKEND} CACHE STRING
"Which of MIOpens's backends to use?" )
set_property( CACHE MIOPEN_BACKEND PROPERTY STRINGS
OpenCL HIP HIPOC HIPNOGPU)
set( MIOPEN_BACKEND ${MIOPEN_DEFAULT_BACKEND} CACHE STRING "Which of MIOpens's backends to use?" )
set_property( CACHE MIOPEN_BACKEND PROPERTY STRINGS OpenCL HIP HIPOC HIPNOGPU )

set_var_to_condition(MIOPEN_BUILD_DRIVER_DEFAULT (NOT MIOPEN_EMBED_BUILD) AND (NOT (MIOPEN_BACKEND STREQUAL "HIPNOGPU")))
option(MIOPEN_BUILD_DRIVER "Build MIOpenDriver (and use it in tests)" ${MIOPEN_BUILD_DRIVER_DEFAULT})
message(STATUS "MIOPEN_BUILD_DRIVER: ${MIOPEN_BUILD_DRIVER}" )

# OpenCL 1.2
if( MIOPEN_BACKEND STREQUAL "OpenCL")
if(MIOPEN_BACKEND STREQUAL "OpenCL")
set(MIOPEN_BACKEND_OPENCL 1)
find_package( OpenCL REQUIRED )
find_program(MIOPEN_HIP_COMPILER clang++
Expand Down Expand Up @@ -314,12 +314,11 @@ message(STATUS "Hip compiler flags: ${HIP_COMPILER_FLAGS}")
add_compile_definitions($<$<COMPILE_LANGUAGE:CXX>:HIP_COMPILER_FLAGS=${HIP_COMPILER_FLAGS}>)

# HIP
if( MIOPEN_BACKEND STREQUAL "HIP" OR MIOPEN_BACKEND STREQUAL "HIPOC" OR MIOPEN_BACKEND STREQUAL "HIPNOGPU")
if(MIOPEN_BACKEND MATCHES "^HIP") # "HIP","HIPOC","HIPNOGPU"
if(MIOPEN_USE_COMPOSABLEKERNEL)
if(MIOPEN_BUILD_CK)
include(cmake/Dependencies.cmake)

execute_process (
execute_process(
COMMAND bash -c "grep -P -o '^[ \t]*(?<!#)[ \t]*\.\./composablekernel' ${CMAKE_SOURCE_DIR}/requirements.txt"
OUTPUT_VARIABLE _match
)
Expand All @@ -333,7 +332,7 @@ if( MIOPEN_BACKEND STREQUAL "HIP" OR MIOPEN_BACKEND STREQUAL "HIPOC" OR MIOPEN_B
find_package(composable_kernel 1.0.0 COMPONENTS device_conv_operations)
endif()
endif()
if( MIOPEN_BACKEND STREQUAL "HIPNOGPU")
if(MIOPEN_BACKEND STREQUAL "HIPNOGPU")
set(MIOPEN_MODE_NOGPU 1)
endif()
set(MIOPEN_BACKEND_HIP 1)
Expand Down Expand Up @@ -526,8 +525,8 @@ if(NOT WIN32 AND MIOPEN_USE_ROCTRACER)
find_path(ROCTRACER_INCLUDE_DIR "roctracer/roctx.h")
find_library(rocTracer roctx64)
if(rocTracer AND ROCTRACER_INCLUDE_DIR)
MESSAGE(STATUS "Build with rocTracer: " ${rocTracer})
MESSAGE(STATUS "rocTracer include directory: " ${ROCTRACER_INCLUDE_DIR})
message(STATUS "Build with rocTracer: " ${rocTracer})
message(STATUS "rocTracer include directory: " ${ROCTRACER_INCLUDE_DIR})
set(MIOPEN_PACKAGE_REQS "${MIOPEN_PACKAGE_REQS}, roctracer")
else()
message(WARNING "rocTracer cannot be found! Build without rocTracer")
Expand Down Expand Up @@ -658,7 +657,7 @@ endfunction()
# install for all targets; this was the behaviour before MIOPEN_INSTALL_GPU_DATABASES
# was added.
set(ALL_GPU_DATABASES gfx803 gfx900 gfx906 gfx908 gfx90a gfx942 gfx1030)
set(MIOPEN_INSTALL_GPU_DATABASES "${ALL_GPU_DATABASES}" CACHE LIST "List of AMDGPU targets for which to install databases")
set(MIOPEN_INSTALL_GPU_DATABASES "${ALL_GPU_DATABASES}" CACHE STRING "List of AMDGPU targets for which to install databases")

# This list should be updated when a new KDB file is added to the project
set(KDB_BZ2_FILES gfx942.kdb.bz2 gfx90a.kdb.bz2 gfx1030.kdb.bz2 gfx908.kdb.bz2 gfx906.kdb.bz2 gfx900.kdb.bz2)
Expand Down
2 changes: 1 addition & 1 deletion projects/miopen/test/gtest/test_categories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ exclude_gpu:

exclude_gpu_gfx110X:
test_patterns:
- *gfx11_common_patterns
- gfx11_common_patterns
- "*/GPU_MIOpenDriver*"
- "Smoke/CPU_Handle_NONE*"
- "Full/GPU_reduce_custom_fp32*"
Expand Down
Loading