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
composable_kernel_ROCM
Commits
84c65962
Commit
84c65962
authored
Jul 23, 2024
by
Astha Rai
Browse files
initial push
parent
5d8c3d81
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
CMakeLists.txt
CMakeLists.txt
+1
-0
codegen/CMakeLists.txt
codegen/CMakeLists.txt
+10
-9
codegen/test/CMakeLists.txt
codegen/test/CMakeLists.txt
+3
-1
No files found.
CMakeLists.txt
View file @
84c65962
...
@@ -513,6 +513,7 @@ if(NOT DEFINED INSTANCES_ONLY)
...
@@ -513,6 +513,7 @@ if(NOT DEFINED INSTANCES_ONLY)
PACKAGE_NAME examples
PACKAGE_NAME examples
)
)
add_subdirectory
(
example
)
add_subdirectory
(
example
)
add_subdirectory
(
codegen
)
if
(
BUILD_TESTING
)
if
(
BUILD_TESTING
)
add_subdirectory
(
test
)
add_subdirectory
(
test
)
endif
()
endif
()
...
...
codegen/CMakeLists.txt
View file @
84c65962
cmake_minimum_required
(
VERSION 3.16
)
#
cmake_minimum_required(VERSION 3.16)
project
(
composable_kernel_host LANGUAGES CXX HIP
)
#
project(composable_kernel_host LANGUAGES CXX HIP)
set
(
CMAKE_EXPORT_COMPILE_COMMANDS ON
)
set
(
CMAKE_EXPORT_COMPILE_COMMANDS ON
)
...
@@ -8,17 +8,18 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
...
@@ -8,17 +8,18 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/bin
)
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/bin
)
set
(
CK_ROOT
${
CMAKE_CURRENT_SOURCE_DIR
}
/..
)
set
(
CK_ROOT
${
CMAKE_CURRENT_SOURCE_DIR
}
/..
)
find_package
(
ROCM
)
#
find_package(ROCM)
include
(
ROCMInstallTargets
)
#
include(ROCMInstallTargets)
include
(
ROCMTest
)
#
include(ROCMTest)
add_compile_options
(
-std=c++17
)
add_compile_options
(
-std=c++17
)
find_package
(
hip
)
find_package
(
hip
)
add_custom_target
(
codegen
)
## HIP
## HIP
set
(
CMAKE_HIP_PLATFORM amd
)
#
set(CMAKE_HIP_PLATFORM amd)
set
(
CMAKE_HIP_COMPILER
${
CMAKE_CXX_COMPILER
}
)
#
set(CMAKE_HIP_COMPILER ${CMAKE_CXX_COMPILER})
set
(
CMAKE_HIP_EXTENSIONS ON
)
#
set(CMAKE_HIP_EXTENSIONS ON)
message
(
"CMAKE_HIP_COMPILER:
${
CMAKE_HIP_COMPILER
}
"
)
#
message("CMAKE_HIP_COMPILER: ${CMAKE_HIP_COMPILER}")
# add include directories
# add include directories
include_directories
(
BEFORE
include_directories
(
BEFORE
...
...
codegen/test/CMakeLists.txt
View file @
84c65962
...
@@ -4,7 +4,9 @@ file(GLOB TEST_SRCS CONFIGURE_DEPENDS *.cpp)
...
@@ -4,7 +4,9 @@ file(GLOB TEST_SRCS CONFIGURE_DEPENDS *.cpp)
foreach
(
TEST_SRC
${
TEST_SRCS
}
)
foreach
(
TEST_SRC
${
TEST_SRCS
}
)
set_source_files_properties
(
${
TEST_SRC
}
PROPERTIES LANGUAGE HIP
)
set_source_files_properties
(
${
TEST_SRC
}
PROPERTIES LANGUAGE HIP
)
get_filename_component
(
BASE_NAME
${
TEST_SRC
}
NAME_WE
)
get_filename_component
(
BASE_NAME
${
TEST_SRC
}
NAME_WE
)
rocm_add_test_executable
(
test_host_
${
BASE_NAME
}
${
TEST_SRC
}
)
add_executable
(
test_host_
${
BASE_NAME
}
${
TEST_SRC
}
)
add_dependencies
(
codegen test_host_
${
BASE_NAME
}
)
add_test
(
NAME codegen_test_
${
BASE_NAME
}
COMMAND test_host_
${
BASE_NAME
}
)
target_link_libraries
(
test_host_
${
BASE_NAME
}
ck_rtc ck_host
)
target_link_libraries
(
test_host_
${
BASE_NAME
}
ck_rtc ck_host
)
# target_link_libraries(test_host_${BASE_NAME} ${CK_ROOT}/build/lib/libutility.a)
# target_link_libraries(test_host_${BASE_NAME} ${CK_ROOT}/build/lib/libutility.a)
target_include_directories
(
test_host_
${
BASE_NAME
}
PUBLIC
include
())
target_include_directories
(
test_host_
${
BASE_NAME
}
PUBLIC
include
())
...
...
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