Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
728bea34
"app/git@developer.sourcefind.cn:orangecat/ollama.git" did not exist on "e40145a39df0fc8bd6e98ca382806fb02daf8ae1"
Unverified
Commit
728bea34
authored
Oct 30, 2023
by
Artur Wojcik
Committed by
GitHub
Oct 29, 2023
Browse files
make CK JIT optional (#2383)
parent
347f805e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
10 deletions
+18
-10
CMakeLists.txt
CMakeLists.txt
+6
-0
src/targets/gpu/CMakeLists.txt
src/targets/gpu/CMakeLists.txt
+8
-9
test/CMakeLists.txt
test/CMakeLists.txt
+4
-1
No files found.
CMakeLists.txt
View file @
728bea34
...
...
@@ -57,6 +57,12 @@ else()
option
(
MIGRAPHX_ENABLE_PYTHON
"Enable python bindings"
ON
)
endif
()
if
(
WIN32
)
# CK is not yet ported to Windows
option
(
MIGRAPHX_USE_COMPOSABLEKERNEL
"Enable MIGraphX to use composable kernel JIT library"
OFF
)
else
()
option
(
MIGRAPHX_USE_COMPOSABLEKERNEL
"Enable MIGraphX to use composable kernel JIT library"
ON
)
endif
()
find_path
(
HALF_INCLUDE_DIR half.hpp PATH_SUFFIXES half
)
if
(
NOT HALF_INCLUDE_DIR
)
message
(
FATAL_ERROR
"Could not find half.hpp - Please check that the install path of half.hpp has been added to CMAKE_PREFIX_PATH"
)
...
...
src/targets/gpu/CMakeLists.txt
View file @
728bea34
...
...
@@ -37,8 +37,7 @@ if(NOT TARGET MIOpen)
message
(
SEND_ERROR
"Cant find miopen"
)
endif
()
if
(
NOT WIN32
)
# TODO: re-enable when CK is ported to Windows
if
(
MIGRAPHX_USE_COMPOSABLEKERNEL
)
find_package
(
composable_kernel 1.0.0 REQUIRED COMPONENTS jit_library
)
endif
()
...
...
@@ -52,10 +51,10 @@ file(GLOB KERNEL_FILES CONFIGURE_DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernels/include/migraphx/kernels/*.hpp
)
message
(
STATUS
"KERNEL_FILES:
${
KERNEL_FILES
}
"
)
if
(
WIN32
)
# TODO: re-enable when CK is ported to Windows
if
(
NOT MIGRAPHX_USE_COMPOSABLEKERNEL
)
list
(
REMOVE_ITEM KERNEL_FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernels/include/migraphx/kernels/ck_gemm.hpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernels/include/migraphx/kernels/ck_gemm_softmax_gemm.hpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernels/include/migraphx/kernels/ck.hpp
)
endif
()
...
...
@@ -103,9 +102,10 @@ rocm_clang_tidy_check(kernel_file_check)
file
(
GLOB JIT_GPU_SRCS CONFIGURE_DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/jit/*.cpp
)
if
(
WIN32
)
# TODO: re-enable when CK is ported to Windows
list
(
REMOVE_ITEM JIT_GPU_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/jit/ck_gemm.cpp
)
if
(
NOT MIGRAPHX_USE_COMPOSABLEKERNEL
)
list
(
REMOVE_ITEM JIT_GPU_SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/jit/ck_gemm.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/jit/ck_gemm_softmax_gemm.cpp
)
endif
()
add_library
(
migraphx_gpu
...
...
@@ -281,8 +281,7 @@ endif()
target_link_libraries
(
migraphx_gpu PUBLIC migraphx MIOpen roc::rocblas
)
target_link_libraries
(
migraphx_gpu PRIVATE migraphx_device migraphx_kernels
)
if
(
NOT WIN32
)
# TODO: re-enable when CK is ported to Windows
if
(
MIGRAPHX_USE_COMPOSABLEKERNEL
)
target_link_libraries
(
migraphx_gpu PRIVATE composable_kernel::jit_library
)
endif
()
...
...
test/CMakeLists.txt
View file @
728bea34
...
...
@@ -146,7 +146,10 @@ endfunction()
function
(
test_headers PREFIX
)
file
(
GLOB HEADERS CONFIGURE_DEPENDS
${
ARGN
}
)
if
(
NOT MIGRAPHX_USE_COMPOSABLEKERNEL
)
list
(
REMOVE_ITEM HEADERS
${
CMAKE_SOURCE_DIR
}
/src/targets/gpu/include/migraphx/gpu/ck.hpp
)
endif
()
foreach
(
HEADER
${
HEADERS
}
)
file
(
RELATIVE_PATH HEADER_REL
${
CMAKE_SOURCE_DIR
}
${
HEADER
}
)
string
(
MAKE_C_IDENTIFIER
${
HEADER_REL
}
TEST_NAME
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment