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
f8c7050b
Commit
f8c7050b
authored
Oct 05, 2023
by
Artur Wojcik
Browse files
cmake_gpu
parent
730cdf7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
src/targets/gpu/CMakeLists.txt
src/targets/gpu/CMakeLists.txt
+8
-18
No files found.
src/targets/gpu/CMakeLists.txt
View file @
f8c7050b
...
@@ -58,6 +58,9 @@ include(Embed)
...
@@ -58,6 +58,9 @@ include(Embed)
add_embed_library
(
migraphx_kernels
${
KERNEL_FILES
}
BASE_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernels/include/
)
add_embed_library
(
migraphx_kernels
${
KERNEL_FILES
}
BASE_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernels/include/
)
configure_file
(
device/targets.hpp.in include/migraphx/gpu/device/targets.hpp
)
configure_file
(
device/targets.hpp.in include/migraphx/gpu/device/targets.hpp
)
file
(
GLOB DEVICE_GPU_SRCS CONFIGURE_DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/device/*.cpp
)
add_library
(
migraphx_device
${
DEVICE_GPU_SRCS
}
)
add_library
(
compile_for_gpu INTERFACE
)
add_library
(
compile_for_gpu INTERFACE
)
target_compile_features
(
compile_for_gpu INTERFACE cxx_std_17
)
target_compile_features
(
compile_for_gpu INTERFACE cxx_std_17
)
target_compile_options
(
compile_for_gpu INTERFACE -fno-gpu-rdc -Wno-cuda-compat -Wno-unused-command-line-argument -Xclang -fallow-half-arguments-and-returns
)
target_compile_options
(
compile_for_gpu INTERFACE -fno-gpu-rdc -Wno-cuda-compat -Wno-unused-command-line-argument -Xclang -fallow-half-arguments-and-returns
)
...
@@ -70,23 +73,6 @@ if(HAS_HIP_LAMBDA_HOST_DEVICE)
...
@@ -70,23 +73,6 @@ if(HAS_HIP_LAMBDA_HOST_DEVICE)
target_compile_options
(
compile_for_gpu INTERFACE -fhip-lambda-host-device
)
target_compile_options
(
compile_for_gpu INTERFACE -fhip-lambda-host-device
)
endif
()
endif
()
add_library
(
migraphx_device
device/argmax.cpp
device/argmin.cpp
device/contiguous.cpp
device/fill.cpp
device/gather.cpp
device/int8_gemm_pack.cpp
device/logsoftmax.cpp
device/multinomial.cpp
device/nonzero.cpp
device/pad.cpp
device/prefix_scan_sum.cpp
device/reverse.cpp
device/rnn_variable_seq_lens.cpp
device/scatter.cpp
device/topk.cpp
)
set_target_properties
(
migraphx_device PROPERTIES EXPORT_NAME device
)
set_target_properties
(
migraphx_device PROPERTIES EXPORT_NAME device
)
rocm_set_soversion
(
migraphx_device
${
MIGRAPHX_SO_VERSION
}
)
rocm_set_soversion
(
migraphx_device
${
MIGRAPHX_SO_VERSION
}
)
rocm_clang_tidy_check
(
migraphx_device
)
rocm_clang_tidy_check
(
migraphx_device
)
...
@@ -252,7 +238,11 @@ else()
...
@@ -252,7 +238,11 @@ else()
)
)
if
(
DEFINED CMAKE_CXX_COMPILER_LAUNCHER
)
if
(
DEFINED CMAKE_CXX_COMPILER_LAUNCHER
)
execute_process
(
COMMAND which
${
CMAKE_CXX_COMPILER_LAUNCHER
}
OUTPUT_VARIABLE MIGRAPHX_HIP_COMPILER_LAUNCHER
)
if
(
WIN32
)
execute_process
(
COMMAND where
${
CMAKE_CXX_COMPILER_LAUNCHER
}
OUTPUT_VARIABLE MIGRAPHX_HIP_COMPILER_LAUNCHER
)
else
()
execute_process
(
COMMAND which
${
CMAKE_CXX_COMPILER_LAUNCHER
}
OUTPUT_VARIABLE MIGRAPHX_HIP_COMPILER_LAUNCHER
)
endif
()
string
(
STRIP
"
${
MIGRAPHX_HIP_COMPILER_LAUNCHER
}
"
MIGRAPHX_HIP_COMPILER_LAUNCHER
)
string
(
STRIP
"
${
MIGRAPHX_HIP_COMPILER_LAUNCHER
}
"
MIGRAPHX_HIP_COMPILER_LAUNCHER
)
target_compile_definitions
(
migraphx_gpu PRIVATE -DMIGRAPHX_HIP_COMPILER_LAUNCHER=
"
${
MIGRAPHX_HIP_COMPILER_LAUNCHER
}
"
)
target_compile_definitions
(
migraphx_gpu PRIVATE -DMIGRAPHX_HIP_COMPILER_LAUNCHER=
"
${
MIGRAPHX_HIP_COMPILER_LAUNCHER
}
"
)
endif
()
endif
()
...
...
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