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
Commits
2474dddb
Unverified
Commit
2474dddb
authored
Aug 03, 2023
by
Illia Silin
Committed by
GitHub
Aug 03, 2023
Browse files
add an option to build ckProfiler package for specific architectures (#828)
parent
aac65a03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
6 deletions
+37
-6
CMakeLists.txt
CMakeLists.txt
+37
-6
No files found.
CMakeLists.txt
View file @
2474dddb
...
@@ -60,11 +60,34 @@ message("checking which targets are supported")
...
@@ -60,11 +60,34 @@ message("checking which targets are supported")
#This is the list of targets to be used in case GPU_TARGETS is not set on command line
#This is the list of targets to be used in case GPU_TARGETS is not set on command line
#These targets will be filtered and only supported ones will be used
#These targets will be filtered and only supported ones will be used
#Setting GPU_TARGETS on command line will override this list
#Setting GPU_TARGETS on command line will override this list
rocm_check_target_ids
(
DEFAULT_GPU_TARGETS
if
(
NOT PROFILER_ONLY
)
TARGETS
"gfx900;gfx906;gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1030;gfx1100;gfx1101;gfx1102"
rocm_check_target_ids
(
DEFAULT_GPU_TARGETS
)
TARGETS
"gfx900;gfx906;gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1030;gfx1100;gfx1101;gfx1102"
)
else
()
add_definitions
(
-DPROFILER_ONLY
)
if
(
GPU_TARGETS
)
message
(
FATAL_ERROR
"For PROFILE_ONLY build, please do not set GPU_TARGETS, use GPU_ARCH = gfx9, gfx10, or gfx11"
)
endif
()
if
(
GPU_ARCH MATCHES
"gfx9"
)
rocm_check_target_ids
(
DEFAULT_GPU_TARGETS TARGETS
"gfx900;gfx906;gfx908;gfx90a;gfx940;gfx941;gfx942"
)
elseif
(
GPU_ARCH MATCHES
"gfx10"
)
rocm_check_target_ids
(
DEFAULT_GPU_TARGETS TARGETS
"gfx1030"
)
elseif
(
GPU_ARCH MATCHES
"gfx11"
)
rocm_check_target_ids
(
DEFAULT_GPU_TARGETS TARGETS
"gfx1100;gfx1101;gfx1102"
)
else
()
message
(
FATAL_ERROR
"For PROFILE_ONLY build, please specify GPU_ARCH as gfx9, gfx10, or gfx11"
)
endif
()
endif
()
message
(
"Supported GPU_TARGETS=
${
DEFAULT_GPU_TARGETS
}
"
)
message
(
"Supported GPU_TARGETS=
${
DEFAULT_GPU_TARGETS
}
"
)
set
(
AMDGPU_TARGETS
"
${
DEFAULT_GPU_TARGETS
}
"
CACHE STRING
" "
)
set
(
AMDGPU_TARGETS
"
${
DEFAULT_GPU_TARGETS
}
"
CACHE STRING
" "
)
if
(
GPU_TARGETS
)
message
(
"Building CK for the following targets:
${
GPU_TARGETS
}
"
)
else
()
message
(
"Building CK for the following targets:
${
AMDGPU_TARGETS
}
"
)
endif
()
find_package
(
hip
)
find_package
(
hip
)
option
(
USE_BITINT_EXTENSION_INT4,
"Whether to enable clang's BitInt extension to provide int4 data type."
OFF
)
option
(
USE_BITINT_EXTENSION_INT4,
"Whether to enable clang's BitInt extension to provide int4 data type."
OFF
)
...
@@ -347,6 +370,7 @@ add_custom_target(instances DEPENDS utility;${CK_DEVICE_INSTANCES} SOURCES ${IN
...
@@ -347,6 +370,7 @@ add_custom_target(instances DEPENDS utility;${CK_DEVICE_INSTANCES} SOURCES ${IN
add_subdirectory
(
library
)
add_subdirectory
(
library
)
if
(
NOT DEFINED INSTANCES_ONLY
)
if
(
NOT DEFINED INSTANCES_ONLY
)
if
(
NOT DEFINED PROFILER_ONLY
)
rocm_package_setup_component
(
tests
rocm_package_setup_component
(
tests
LIBRARY_NAME composablekernel
LIBRARY_NAME composablekernel
PACKAGE_NAME tests
# Prevent -static suffix on package name
PACKAGE_NAME tests
# Prevent -static suffix on package name
...
@@ -356,15 +380,22 @@ if(NOT DEFINED INSTANCES_ONLY)
...
@@ -356,15 +380,22 @@ if(NOT DEFINED INSTANCES_ONLY)
LIBRARY_NAME composablekernel
LIBRARY_NAME composablekernel
PACKAGE_NAME examples
PACKAGE_NAME examples
)
)
add_subdirectory
(
example
)
add_subdirectory
(
test
)
rocm_package_setup_component
(
profiler
rocm_package_setup_component
(
profiler
LIBRARY_NAME composablekernel
LIBRARY_NAME composablekernel
PACKAGE_NAME ckProfiler
PACKAGE_NAME ckProfiler
)
)
add_subdirectory
(
example
)
add_subdirectory
(
test
)
add_subdirectory
(
profiler
)
add_subdirectory
(
profiler
)
else
()
#When building PROFILER_ONLY, label the package with GPU_ARCH
rocm_package_setup_component
(
profiler
LIBRARY_NAME composablekernel
PACKAGE_NAME ckProfiler_
${
GPU_ARCH
}
)
add_subdirectory
(
profiler
)
endif
()
endif
()
endif
()
#Create an interface target for the include only files and call it "composablekernels"
#Create an interface target for the include only files and call it "composablekernels"
...
...
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