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
9f1b4276
Commit
9f1b4276
authored
Apr 04, 2024
by
Jakub Piasecki
Browse files
resolved conflicts
parents
711857c4
c7010716
Changes
198
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
179 additions
and
88 deletions
+179
-88
CMakeLists.txt
CMakeLists.txt
+16
-0
client_example/02_gemm_add_add_fastgelu/CMakeLists.txt
client_example/02_gemm_add_add_fastgelu/CMakeLists.txt
+18
-16
client_example/03_gemm_layernorm/CMakeLists.txt
client_example/03_gemm_layernorm/CMakeLists.txt
+6
-4
client_example/04_contraction/CMakeLists.txt
client_example/04_contraction/CMakeLists.txt
+12
-11
client_example/07_grouped_convnd_fwd/CMakeLists.txt
client_example/07_grouped_convnd_fwd/CMakeLists.txt
+6
-4
client_example/08_fused_attention/CMakeLists.txt
client_example/08_fused_attention/CMakeLists.txt
+6
-4
client_example/09_quantization/CMakeLists.txt
client_example/09_quantization/CMakeLists.txt
+15
-15
client_example/15_convnd_bwd_data/CMakeLists.txt
client_example/15_convnd_bwd_data/CMakeLists.txt
+6
-4
client_example/15_gemm_add_multiply/CMakeLists.txt
client_example/15_gemm_add_multiply/CMakeLists.txt
+4
-3
client_example/16_convnd_fwd/CMakeLists.txt
client_example/16_convnd_fwd/CMakeLists.txt
+5
-0
client_example/16_convnd_fwd/common.hpp
client_example/16_convnd_fwd/common.hpp
+5
-3
client_example/16_convnd_fwd/conv3d_fwd_fp8_bf8.cpp
client_example/16_convnd_fwd/conv3d_fwd_fp8_bf8.cpp
+50
-0
client_example/17_grouped_gemm_fastgelu/CMakeLists.txt
client_example/17_grouped_gemm_fastgelu/CMakeLists.txt
+4
-2
client_example/20_splitk_gemm/CMakeLists.txt
client_example/20_splitk_gemm/CMakeLists.txt
+1
-1
client_example/21_grouped_gemm_bias/CMakeLists.txt
client_example/21_grouped_gemm_bias/CMakeLists.txt
+4
-2
client_example/22_grouped_gemm/CMakeLists.txt
client_example/22_grouped_gemm/CMakeLists.txt
+10
-8
client_example/24_grouped_conv_activation/CMakeLists.txt
client_example/24_grouped_conv_activation/CMakeLists.txt
+2
-0
client_example/25_wrapper/CMakeLists.txt
client_example/25_wrapper/CMakeLists.txt
+1
-3
client_example/CMakeLists.txt
client_example/CMakeLists.txt
+4
-1
example/01_gemm/CMakeLists.txt
example/01_gemm/CMakeLists.txt
+4
-7
No files found.
CMakeLists.txt
View file @
9f1b4276
...
...
@@ -143,6 +143,22 @@ if(GPU_TARGETS)
else
()
message
(
"Building CK for the following targets:
${
AMDGPU_TARGETS
}
"
)
endif
()
if
(
GPU_TARGETS
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_definitions
(
-DCK_USE_XDL
)
set
(
CK_USE_XDL
"ON"
)
endif
()
if
(
GPU_TARGETS MATCHES
"gfx11"
)
add_definitions
(
-DCK_USE_WMMA
)
set
(
CK_USE_WMMA
"ON"
)
endif
()
else
()
add_definitions
(
-DCK_USE_WMMA -DCK_USE_XDL
)
set
(
CK_USE_XDL
"ON"
)
set
(
CK_USE_WMMA
"ON"
)
endif
()
find_package
(
hip
)
# No assumption that HIP kernels are launched with uniform block size for backward compatibility
# SWDEV-413293 and https://reviews.llvm.org/D155213
...
...
client_example/02_gemm_add_add_fastgelu/CMakeLists.txt
View file @
9f1b4276
add_custom_target
(
client_gemm_fastgelu_examples
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_custom_target
(
client_gemm_fastgelu_examples
)
add_executable
(
client_gemm_add_add_fastgelu gemm_add_add_fastgelu.cpp
)
target_link_libraries
(
client_gemm_add_add_fastgelu PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_add_add_fastgelu gemm_add_add_fastgelu.cpp
)
target_link_libraries
(
client_gemm_add_add_fastgelu PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_add_fastgelu gemm_add_fastgelu.cpp
)
target_link_libraries
(
client_gemm_add_fastgelu PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_add_fastgelu gemm_add_fastgelu.cpp
)
target_link_libraries
(
client_gemm_add_fastgelu PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_fastgelu gemm_fastgelu.cpp
)
target_link_libraries
(
client_gemm_fastgelu PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_fastgelu gemm_fastgelu.cpp
)
target_link_libraries
(
client_gemm_fastgelu PRIVATE composable_kernel::device_gemm_operations
)
add_dependencies
(
client_gemm_fastgelu_examples client_gemm_add_add_fastgelu client_gemm_add_fastgelu
add_dependencies
(
client_gemm_fastgelu_examples client_gemm_add_add_fastgelu client_gemm_add_fastgelu
client_gemm_fastgelu
)
add_custom_target
(
client_gemm_fastgelu_generic_examples
)
add_custom_target
(
client_gemm_fastgelu_generic_examples
)
add_executable
(
client_gemm_add_add_fastgelu_generic gemm_add_add_fastgelu_generic.cpp
)
target_link_libraries
(
client_gemm_add_add_fastgelu_generic composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_add_add_fastgelu_generic gemm_add_add_fastgelu_generic.cpp
)
target_link_libraries
(
client_gemm_add_add_fastgelu_generic composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_add_fastgelu_generic gemm_add_fastgelu_generic.cpp
)
target_link_libraries
(
client_gemm_add_fastgelu_generic PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_add_fastgelu_generic gemm_add_fastgelu_generic.cpp
)
target_link_libraries
(
client_gemm_add_fastgelu_generic PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_fastgelu_generic gemm_fastgelu_generic.cpp
)
target_link_libraries
(
client_gemm_fastgelu_generic PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_fastgelu_generic gemm_fastgelu_generic.cpp
)
target_link_libraries
(
client_gemm_fastgelu_generic PRIVATE composable_kernel::device_gemm_operations
)
add_dependencies
(
client_gemm_fastgelu_generic_examples client_gemm_add_add_fastgelu_generic
add_dependencies
(
client_gemm_fastgelu_generic_examples client_gemm_add_add_fastgelu_generic
client_gemm_add_fastgelu_generic client_gemm_fastgelu_generic
)
endif
()
client_example/03_gemm_layernorm/CMakeLists.txt
View file @
9f1b4276
add_executable
(
client_gemm_add_add_layernorm_naive gemm_add_add_layernorm_naive.cpp
)
target_link_libraries
(
client_gemm_add_add_layernorm_naive PRIVATE composable_kernel::device_gemm_operations composable_kernel::device_other_operations
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_executable
(
client_gemm_add_add_layernorm_naive gemm_add_add_layernorm_naive.cpp
)
target_link_libraries
(
client_gemm_add_add_layernorm_naive PRIVATE composable_kernel::device_gemm_operations composable_kernel::device_other_operations
)
add_executable
(
client_gemm_add_relu_add_layernorm_welford gemm_add_relu_add_layernorm_welford.cpp
)
target_link_libraries
(
client_gemm_add_relu_add_layernorm_welford PRIVATE composable_kernel::device_gemm_operations composable_kernel::device_other_operations
)
add_executable
(
client_gemm_add_relu_add_layernorm_welford gemm_add_relu_add_layernorm_welford.cpp
)
target_link_libraries
(
client_gemm_add_relu_add_layernorm_welford PRIVATE composable_kernel::device_gemm_operations composable_kernel::device_other_operations
)
endif
()
client_example/04_contraction/CMakeLists.txt
View file @
9f1b4276
add_executable
(
client_contraction_scale_fp32 contraction_scale_fp32.cpp
)
target_link_libraries
(
client_contraction_scale_fp32 PRIVATE composable_kernel::device_other_operations composable_kernel::device_contraction_operations composable_kernel::device_gemm_operations
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_executable
(
client_contraction_scale_fp32 contraction_scale_fp32.cpp
)
target_link_libraries
(
client_contraction_scale_fp32 PRIVATE composable_kernel::device_other_operations composable_kernel::device_contraction_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_contraction_bilinear_fp32 contraction_bilinear_fp32.cpp
)
target_link_libraries
(
client_contraction_bilinear_fp32 PRIVATE composable_kernel::device_other_operations composable_kernel::device_contraction_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_contraction_bilinear_fp32 contraction_bilinear_fp32.cpp
)
target_link_libraries
(
client_contraction_bilinear_fp32 PRIVATE composable_kernel::device_other_operations composable_kernel::device_contraction_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_contraction_scale_fp64 contraction_scale_fp64.cpp
)
target_link_libraries
(
client_contraction_scale_fp64 PRIVATE composable_kernel::device_other_operations composable_kernel::device_contraction_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_contraction_scale_fp64 contraction_scale_fp64.cpp
)
target_link_libraries
(
client_contraction_scale_fp64 PRIVATE composable_kernel::device_other_operations composable_kernel::device_contraction_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_contraction_bilinear_fp64 contraction_bilinear_fp64.cpp
)
target_link_libraries
(
client_contraction_bilinear_fp64 PRIVATE composable_kernel::device_other_operations composable_kernel::device_contraction_operations composable_kernel::device_gemm_operations
)
add_executable
(
contraction_g1m2n3k1_add_xdl_fp16 contraction_g1m2n3k1_add_xdl_fp16.cpp
)
target_link_libraries
(
contraction_g1m2n3k1_add_xdl_fp16 PRIVATE composable_kernel::device_other_operations composable_kernel::device_contraction_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_contraction_bilinear_fp64 contraction_bilinear_fp64.cpp
)
target_link_libraries
(
client_contraction_bilinear_fp64 PRIVATE composable_kernel::device_other_operations composable_kernel::device_contraction_operations composable_kernel::device_gemm_operations
)
add_executable
(
contraction_g1m2n3k1_add_xdl_fp16 contraction_g1m2n3k1_add_xdl_fp16.cpp
)
target_link_libraries
(
contraction_g1m2n3k1_add_xdl_fp16 PRIVATE composable_kernel::device_other_operations composable_kernel::device_contraction_operations composable_kernel::device_gemm_operations
)
endif
()
client_example/07_grouped_convnd_fwd/CMakeLists.txt
View file @
9f1b4276
add_executable
(
client_grouped_conv2d_fwd grouped_conv2d_fwd.cpp
)
target_link_libraries
(
client_grouped_conv2d_fwd PRIVATE composable_kernel::device_conv_operations
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_executable
(
client_grouped_conv2d_fwd grouped_conv2d_fwd.cpp
)
target_link_libraries
(
client_grouped_conv2d_fwd PRIVATE composable_kernel::device_conv_operations
)
add_executable
(
client_grouped_conv1d_fwd grouped_conv1d_fwd.cpp
)
target_link_libraries
(
client_grouped_conv1d_fwd PRIVATE composable_kernel::device_conv_operations
)
add_executable
(
client_grouped_conv1d_fwd grouped_conv1d_fwd.cpp
)
target_link_libraries
(
client_grouped_conv1d_fwd PRIVATE composable_kernel::device_conv_operations
)
endif
()
\ No newline at end of file
client_example/08_fused_attention/CMakeLists.txt
View file @
9f1b4276
add_executable
(
client_fused_attention fused_attention.cpp
)
target_link_libraries
(
client_fused_attention PRIVATE composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_executable
(
client_fused_attention fused_attention.cpp
)
target_link_libraries
(
client_fused_attention PRIVATE composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_fused_attention_bias fused_attention_bias.cpp
)
target_link_libraries
(
client_fused_attention_bias PRIVATE composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_fused_attention_bias fused_attention_bias.cpp
)
target_link_libraries
(
client_fused_attention_bias PRIVATE composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
endif
()
client_example/09_quantization/CMakeLists.txt
View file @
9f1b4276
if
(
DTYPES MATCHES
"int8"
OR NOT DEFINED DTYPES
)
add_executable
(
client_conv2d_fwd_bias_tanh_perchannel_quantization conv2d_fwd_bias_tanh_perchannel_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_bias_tanh_perchannel_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
if
(
GPU_TARGETS MATCHES
"gfx9"
AND
(
DTYPES MATCHES
"int8"
OR NOT DEFINED DTYPES
)
)
add_executable
(
client_conv2d_fwd_bias_tanh_perchannel_quantization conv2d_fwd_bias_tanh_perchannel_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_bias_tanh_perchannel_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_conv2d_fwd_bias_relu_perchannel_quantization conv2d_fwd_bias_relu_perchannel_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_bias_relu_perchannel_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_conv2d_fwd_bias_relu_perchannel_quantization conv2d_fwd_bias_relu_perchannel_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_bias_relu_perchannel_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_conv2d_fwd_bias_tanh_perlayer_quantization conv2d_fwd_bias_tanh_perlayer_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_bias_tanh_perlayer_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_conv2d_fwd_bias_tanh_perlayer_quantization conv2d_fwd_bias_tanh_perlayer_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_bias_tanh_perlayer_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_conv2d_fwd_bias_relu_perlayer_quantization conv2d_fwd_bias_relu_perlayer_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_bias_relu_perlayer_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_conv2d_fwd_bias_relu_perlayer_quantization conv2d_fwd_bias_relu_perlayer_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_bias_relu_perlayer_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_conv2d_fwd_perchannel_quantization conv2d_fwd_perchannel_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_perchannel_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_conv2d_fwd_perchannel_quantization conv2d_fwd_perchannel_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_perchannel_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_conv2d_fwd_perlayer_quantization conv2d_fwd_perlayer_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_perlayer_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_conv2d_fwd_perlayer_quantization conv2d_fwd_perlayer_quantization.cpp
)
target_link_libraries
(
client_conv2d_fwd_perlayer_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_quantization gemm_quantization.cpp
)
target_link_libraries
(
client_gemm_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
add_executable
(
client_gemm_quantization gemm_quantization.cpp
)
target_link_libraries
(
client_gemm_quantization PRIVATE composable_kernel::device_conv_operations composable_kernel::device_other_operations composable_kernel::device_gemm_operations
)
endif
()
client_example/15_convnd_bwd_data/CMakeLists.txt
View file @
9f1b4276
add_executable
(
client_conv3d_bwd_data_fp16 conv3d_bwd_data_fp16.cpp
)
add_executable
(
client_conv3d_bwd_data_fp32 conv3d_bwd_data_fp32.cpp
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_executable
(
client_conv3d_bwd_data_fp16 conv3d_bwd_data_fp16.cpp
)
add_executable
(
client_conv3d_bwd_data_fp32 conv3d_bwd_data_fp32.cpp
)
target_link_libraries
(
client_conv3d_bwd_data_fp16 PRIVATE composable_kernel::device_conv_operations
)
target_link_libraries
(
client_conv3d_bwd_data_fp32 PRIVATE composable_kernel::device_conv_operations
)
target_link_libraries
(
client_conv3d_bwd_data_fp16 PRIVATE composable_kernel::device_conv_operations
)
target_link_libraries
(
client_conv3d_bwd_data_fp32 PRIVATE composable_kernel::device_conv_operations
)
endif
()
client_example/15_gemm_add_multiply/CMakeLists.txt
View file @
9f1b4276
add_executable
(
client_gemm_add_multiply gemm_add_multiply.cpp
)
target_link_libraries
(
client_gemm_add_multiply PRIVATE composable_kernel::device_gemm_operations
)
\ No newline at end of file
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_executable
(
client_gemm_add_multiply gemm_add_multiply.cpp
)
target_link_libraries
(
client_gemm_add_multiply PRIVATE composable_kernel::device_gemm_operations
)
endif
()
client_example/16_convnd_fwd/CMakeLists.txt
View file @
9f1b4276
...
...
@@ -17,6 +17,11 @@ if((DTYPES MATCHES "bf8") OR NOT DEFINED DTYPES)
target_link_libraries
(
client_conv3d_fwd_bf8 PRIVATE composable_kernel::device_conv_operations
)
endif
()
if
((
DTYPES MATCHES
"fp8"
AND DTYPES MATCHES
"bf8"
)
OR NOT DEFINED DTYPES
)
add_executable
(
client_conv3d_fwd_fp8_bf8 conv3d_fwd_fp8_bf8.cpp
)
target_link_libraries
(
client_conv3d_fwd_fp8_bf8 PRIVATE composable_kernel::device_conv_operations
)
endif
()
if
((
DTYPES MATCHES
"fp32"
)
OR NOT DEFINED DTYPES
)
add_executable
(
client_conv3d_fwd_fp32 conv3d_fwd_fp32.cpp
)
target_link_libraries
(
client_conv3d_fwd_fp32 PRIVATE composable_kernel::device_conv_operations
)
...
...
client_example/16_convnd_fwd/common.hpp
View file @
9f1b4276
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-202
3
, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-202
4
, Advanced Micro Devices, Inc. All rights reserved.
#include <cstdlib>
#include <iomanip>
...
...
@@ -95,7 +95,8 @@ template <ck::index_t NumDimSpatial,
typename
WeiLayout
,
typename
OutLayout
,
ck
::
index_t
NumNonSpatialDim
=
3
,
typename
ComputeType
=
InDataType
>
typename
AComputeType
=
InDataType
,
typename
BComputeType
=
AComputeType
>
bool
run_grouped_conv_fwd
(
std
::
array
<
ck
::
index_t
,
NumDimSpatial
+
NumNonSpatialDim
>
in_lengths
,
std
::
array
<
ck
::
index_t
,
NumDimSpatial
+
NumNonSpatialDim
>
wei_lengths
,
std
::
array
<
ck
::
index_t
,
NumDimSpatial
+
NumNonSpatialDim
>
out_lengths
)
...
...
@@ -186,7 +187,8 @@ bool run_grouped_conv_fwd(std::array<ck::index_t, NumDimSpatial + NumNonSpatialD
PassThrough
,
PassThrough
,
PassThrough
,
ComputeType
>
;
AComputeType
,
BComputeType
>
;
// get device op instances
const
auto
op_ptrs
=
ck
::
tensor_operation
::
device
::
instance
::
DeviceOperationInstanceFactory
<
DeviceOp
>::
GetInstances
();
...
...
client_example/16_convnd_fwd/conv3d_fwd_fp8_bf8.cpp
0 → 100644
View file @
9f1b4276
// SPDX-License-Identifier: MIT
// Copyright (c) 2024, Advanced Micro Devices, Inc. All rights reserved.
#include "common.hpp"
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
using
InDataType
=
ck
::
f8_t
;
using
WeiDataType
=
ck
::
bf8_t
;
using
OutDataType
=
ck
::
f8_t
;
using
InLayout
=
ck
::
tensor_layout
::
convolution
::
NDHWGC
;
using
WeiLayout
=
ck
::
tensor_layout
::
convolution
::
GKZYXC
;
using
OutLayout
=
ck
::
tensor_layout
::
convolution
::
NDHWGK
;
using
AComputeType
=
ck
::
f8_t
;
using
BComputeType
=
ck
::
bf8_t
;
static
constexpr
ck
::
index_t
NumDimSpatial
=
3
;
static
constexpr
ck
::
index_t
G
=
1
;
static
constexpr
ck
::
index_t
N
=
64
;
static
constexpr
ck
::
index_t
K
=
128
;
static
constexpr
ck
::
index_t
C
=
64
;
static
constexpr
ck
::
index_t
Z
=
3
;
static
constexpr
ck
::
index_t
Y
=
3
;
static
constexpr
ck
::
index_t
X
=
3
;
static
constexpr
ck
::
index_t
Di
=
28
;
static
constexpr
ck
::
index_t
Hi
=
28
;
static
constexpr
ck
::
index_t
Wi
=
3
;
static
constexpr
ck
::
index_t
Do
=
28
;
static
constexpr
ck
::
index_t
Ho
=
28
;
static
constexpr
ck
::
index_t
Wo
=
3
;
int
main
()
{
return
run_grouped_conv_fwd
<
NumDimSpatial
,
InDataType
,
WeiDataType
,
OutDataType
,
InLayout
,
WeiLayout
,
OutLayout
,
3
,
AComputeType
,
BComputeType
>
(
{
N
,
Di
,
Hi
,
Wi
,
G
,
C
},
{
G
,
K
,
Z
,
Y
,
X
,
C
},
{
N
,
Do
,
Ho
,
Wo
,
G
,
K
})
?
EXIT_SUCCESS
:
EXIT_FAILURE
;
}
client_example/17_grouped_gemm_fastgelu/CMakeLists.txt
View file @
9f1b4276
add_executable
(
client_grouped_gemm_fastgelu grouped_gemm_fastgelu.cpp
)
target_link_libraries
(
client_grouped_gemm_fastgelu PRIVATE composable_kernel::device_gemm_operations
)
\ No newline at end of file
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_executable
(
client_grouped_gemm_fastgelu grouped_gemm_fastgelu.cpp
)
target_link_libraries
(
client_grouped_gemm_fastgelu PRIVATE composable_kernel::device_gemm_operations
)
endif
()
client_example/20_splitk_gemm/CMakeLists.txt
View file @
9f1b4276
if
((
DTYPES MATCHES
"fp8"
AND DTYPES MATCHES
"fp16"
)
OR NOT DEFINED DTYPES
)
if
(
GPU_TARGETS MATCHES
"gfx9"
AND
((
DTYPES MATCHES
"fp8"
AND DTYPES MATCHES
"fp16"
)
OR NOT DEFINED DTYPES
)
)
add_executable
(
client_splitK_gemm splitK_gemm_fp16_f8.cpp
)
target_link_libraries
(
client_splitK_gemm PRIVATE composable_kernel::device_gemm_operations
)
endif
()
client_example/21_grouped_gemm_bias/CMakeLists.txt
View file @
9f1b4276
add_executable
(
client_grouped_gemm_fixed_nk_bias_fp16 grouped_gemm_fixed_nk_bias_fp16.cpp
)
target_link_libraries
(
client_grouped_gemm_fixed_nk_bias_fp16 PRIVATE composable_kernel::device_gemm_operations
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_executable
(
client_grouped_gemm_fixed_nk_bias_fp16 grouped_gemm_fixed_nk_bias_fp16.cpp
)
target_link_libraries
(
client_grouped_gemm_fixed_nk_bias_fp16 PRIVATE composable_kernel::device_gemm_operations
)
endif
()
client_example/22_grouped_gemm/CMakeLists.txt
View file @
9f1b4276
add_executable
(
client_grouped_gemm_fixed_nk_fp16 grouped_gemm_fixed_nk_fp16.cpp
)
target_link_libraries
(
client_grouped_gemm_fixed_nk_fp16 PRIVATE composable_kernel::device_gemm_operations
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_executable
(
client_grouped_gemm_fixed_nk_fp16 grouped_gemm_fixed_nk_fp16.cpp
)
target_link_libraries
(
client_grouped_gemm_fixed_nk_fp16 PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_grouped_gemm_fixed_nk_fp8 grouped_gemm_fixed_nk_fp8.cpp
)
target_link_libraries
(
client_grouped_gemm_fixed_nk_fp8 PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_grouped_gemm_fixed_nk_fp8 grouped_gemm_fixed_nk_fp8.cpp
)
target_link_libraries
(
client_grouped_gemm_fixed_nk_fp8 PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_grouped_gemm_fixed_nk_i8 grouped_gemm_fixed_nk_i8.cpp
)
target_link_libraries
(
client_grouped_gemm_fixed_nk_i8 PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_grouped_gemm_fixed_nk_i8 grouped_gemm_fixed_nk_i8.cpp
)
target_link_libraries
(
client_grouped_gemm_fixed_nk_i8 PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_grouped_gemm_fixed_nk_bf16 grouped_gemm_fixed_nk_bf16.cpp
)
target_link_libraries
(
client_grouped_gemm_fixed_nk_bf16 PRIVATE composable_kernel::device_gemm_operations
)
add_executable
(
client_grouped_gemm_fixed_nk_bf16 grouped_gemm_fixed_nk_bf16.cpp
)
target_link_libraries
(
client_grouped_gemm_fixed_nk_bf16 PRIVATE composable_kernel::device_gemm_operations
)
endif
()
client_example/24_grouped_conv_activation/CMakeLists.txt
View file @
9f1b4276
if
(
GPU_TARGETS MATCHES
"gfx9"
)
# Fwd scaleadd scaleadd relu
add_executable
(
client_grouped_convnd_fwd_scaleadd_scaleadd_relu_fp32
grouped_convnd_fwd_scaleadd_scaleadd_relu/grouped_conv_fwd_scaleadd_scaleadd_relu_fp32.cpp
)
...
...
@@ -46,3 +47,4 @@ target_link_libraries(client_grouped_convnd_fwd_scale_fp16 PRIVATE composable_ke
add_executable
(
client_grouped_convnd_bwd_data_scale_fp16
grouped_convnd_bwd_data_scale/grouped_conv_bwd_data_scale_fp16.cpp
)
target_link_libraries
(
client_grouped_convnd_bwd_data_scale_fp16 PRIVATE composable_kernel::device_conv_operations
)
endif
()
client_example/25_wrapper/CMakeLists.txt
View file @
9f1b4276
...
...
@@ -2,9 +2,7 @@ add_executable(client_tensor_transform_using_wrapper tensor_transform_using_wrap
target_link_libraries
(
client_tensor_transform_using_wrapper PRIVATE composable_kernel::device_other_operations
)
add_executable
(
client_wrapper_img2col wrapper_img2col.cpp
)
target_link_libraries
(
client_wrapper_img2col PRIVATE composable_kernel::device_other_operations
)
if
(
GPU_TARGETS MATCHES
"gfx908"
OR GPU_TARGETS MATCHES
"gfx90a"
OR
GPU_TARGETS MATCHES
"gfx940"
OR GPU_TARGETS MATCHES
"gfx941"
OR
GPU_TARGETS MATCHES
"gfx942"
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
add_executable
(
client_wrapper_basic_gemm wrapper_basic_gemm.cpp
)
target_link_libraries
(
client_wrapper_basic_gemm PRIVATE composable_kernel::device_other_operations
)
add_executable
(
client_wrapper_optimized_gemm wrapper_optimized_gemm.cpp
)
...
...
client_example/CMakeLists.txt
View file @
9f1b4276
...
...
@@ -48,7 +48,10 @@ else()
endif
()
endif
()
find_package
(
composable_kernel COMPONENTS device_other_operations device_gemm_operations device_conv_operations device_contraction_operations device_reduction_operations
)
find_package
(
composable_kernel COMPONENTS device_other_operations device_gemm_operations device_conv_operations device_reduction_operations
)
if
(
GPU_TARGETS MATCHES
"gfx9"
)
find_package
(
composable_kernel COMPONENTS device_contraction_operations
)
endif
()
find_package
(
hip REQUIRED PATHS /opt/rocm
)
message
(
STATUS
"Build with HIP
${
hip_VERSION
}
"
)
...
...
example/01_gemm/CMakeLists.txt
View file @
9f1b4276
...
...
@@ -27,11 +27,6 @@ add_example_dependencies(example_gemm_xdl example_gemm_xdl_wavelet_fp16)
add_example_executable
(
example_gemm_xdl_skip_b_lds_fp16 gemm_xdl_skip_b_lds_fp16.cpp
)
add_example_dependencies
(
example_gemm_xdl example_gemm_xdl_skip_b_lds_fp16
)
if
(
GPU_TARGETS MATCHES
"gfx11"
)
add_custom_target
(
example_gemm_wmma
)
add_example_executable
(
example_gemm_wmma_fp16 gemm_wmma_fp16.cpp
)
add_example_dependencies
(
example_gemm_wmma example_gemm_wmma_fp16
)
endif
()
add_example_executable
(
example_gemm_xdl_bf16 gemm_xdl_bf16.cpp
)
add_example_dependencies
(
example_gemm_xdl example_gemm_xdl_bf16
)
...
...
@@ -47,8 +42,7 @@ if(USE_BITINT_EXTENSION_INT4)
add_example_dependencies
(
example_gemm_xdl example_gemm_xdl_int4
)
endif
(
USE_BITINT_EXTENSION_INT4
)
# FIXME: re-enable this example as test when SWDEV-335738 is fixed
add_example_executable_no_testing
(
example_gemm_xdl_fp64 gemm_xdl_fp64.cpp
)
add_example_executable
(
example_gemm_xdl_fp64 gemm_xdl_fp64.cpp
)
add_example_dependencies
(
example_gemm_xdl example_gemm_xdl_fp64
)
add_example_executable
(
example_gemm_xdl_streamk gemm_xdl_streamk.cpp
)
...
...
@@ -75,3 +69,6 @@ add_example_dependencies(example_gemm_xdl example_gemm_xdl_fp8_bf8)
add_example_executable
(
example_gemm_xdl_fp16_fp8 gemm_xdl_fp16_fp8.cpp
)
add_example_dependencies
(
example_gemm_xdl example_gemm_xdl_fp16_fp8
)
add_custom_target
(
example_gemm_wmma
)
add_example_executable
(
example_gemm_wmma_fp16 gemm_wmma_fp16.cpp
)
add_example_dependencies
(
example_gemm_wmma example_gemm_wmma_fp16
)
Prev
1
2
3
4
5
…
10
Next
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