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
7b73260c
"examples/inference/image_to_image.py" did not exist on "5f25818a0fd8747c46b27becc9c63dcfbbfeb638"
Commit
7b73260c
authored
Apr 20, 2023
by
ltqin
Browse files
add architecture
parent
7f632d63
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
7 deletions
+47
-7
example/47_gemm_bias_softmax_gemm_permute/CMakeLists.txt
example/47_gemm_bias_softmax_gemm_permute/CMakeLists.txt
+0
-1
library/include/ck/library/tensor_operation_instance/add_device_operation_instance.hpp
...nsor_operation_instance/add_device_operation_instance.hpp
+6
-1
library/include/ck/library/tensor_operation_instance/gpu/batched_gemm_softmax_gemm_permute/batched_gemm_softmax_gemm_permute.hpp
...oftmax_gemm_permute/batched_gemm_softmax_gemm_permute.hpp
+3
-2
library/include/ck/library/tensor_operation_instance/gpu/batched_gemm_softmax_gemm_permute/device_batched_gemm_multiple_d_softmax_gemm_permute_xdl_cshuffle_bf16_gmk_gnk_gno_gmo_instance.hpp
...mm_permute_xdl_cshuffle_bf16_gmk_gnk_gno_gmo_instance.hpp
+2
-1
library/include/ck/library/tensor_operation_instance/gpu/batched_gemm_softmax_gemm_permute/device_batched_gemm_multiple_d_softmax_gemm_permute_xdl_cshuffle_fp16_gmk_gnk_gno_gmo_instance.hpp
...mm_permute_xdl_cshuffle_fp16_gmk_gnk_gno_gmo_instance.hpp
+2
-1
src_example/01_gemm_bias_softmax_gemm_permute/gemm_bias_softmax_gemm_permute.cpp
...s_softmax_gemm_permute/gemm_bias_softmax_gemm_permute.cpp
+19
-1
src_example/CMakeLists.txt
src_example/CMakeLists.txt
+15
-0
No files found.
example/47_gemm_bias_softmax_gemm_permute/CMakeLists.txt
View file @
7b73260c
add_example_executable
(
example_gemm_bias_softmax_gemm_permute gemm_bias_softmax_gemm_permute.cpp
)
add_example_executable
(
example_gemm_bias_softmax_gemm_permute_nolib gemm_bias_softmax_gemm_permute_nolib.cpp
)
library/include/ck/library/tensor_operation_instance/add_device_operation_instance.hpp
View file @
7b73260c
...
...
@@ -29,7 +29,12 @@ void add_device_operation_instances(std::vector<std::unique_ptr<BaseOp>>& op_ins
});
}
template
<
typename
DeviceOp
,
typename
Tag
=
void
>
enum
struct
ArchitectureEnum
{
Xdl
,
Dl
};
template
<
typename
DeviceOp
,
ArchitectureEnum
Arch
=
ArchitectureEnum
::
Xdl
>
struct
DeviceOperationInstanceCreator
;
}
// namespace instance
}
// namespace device
...
...
library/include/ck/library/tensor_operation_instance/gpu/batched_gemm_softmax_gemm_permute/batched_gemm_softmax_gemm_permute.hpp
View file @
7b73260c
...
...
@@ -34,7 +34,8 @@ template <index_t NumDimG,
typename
C0DEElementwiseOperation
,
typename
B1ElementwiseOperation
,
typename
C1DEElementwiseOperation
,
MaskingSpecialization
MaskingSpec
>
MaskingSpecialization
MaskingSpec
,
ArchitectureEnum
Arch
=
ArchitectureEnum
::
Xdl
>
void
add_device_instances
(
std
::
vector
<
std
::
unique_ptr
<
DeviceBatchedGemmSoftmaxGemmPermute
<
NumDimG
,
NumDimM
,
...
...
@@ -72,7 +73,7 @@ void add_device_instances(
C1DEElementwiseOperation
,
MaskingSpec
>
;
add_device_operation_instances
(
instances
,
DeviceOperationInstanceCreator
<
DeviceOp
>::
create_device_instances
());
instances
,
DeviceOperationInstanceCreator
<
DeviceOp
,
Arch
>::
create_device_instances
());
}
}
// namespace instance
}
// namespace device
...
...
library/include/ck/library/tensor_operation_instance/gpu/batched_gemm_softmax_gemm_permute/device_batched_gemm_multiple_d_softmax_gemm_permute_xdl_cshuffle_bf16_gmk_gnk_gno_gmo_instance.hpp
View file @
7b73260c
...
...
@@ -92,7 +92,8 @@ struct DeviceOperationInstanceCreator<DeviceBatchedGemmSoftmaxGemmPermute<NumDim
C0DEElementwiseOperation
,
B1ElementwiseOperation
,
C1DEElementwiseOperation
,
MaskingSpec
>>
MaskingSpec
>
,
ArchitectureEnum
::
Xdl
>
{
static
auto
create_device_instances
()
{
...
...
library/include/ck/library/tensor_operation_instance/gpu/batched_gemm_softmax_gemm_permute/device_batched_gemm_multiple_d_softmax_gemm_permute_xdl_cshuffle_fp16_gmk_gnk_gno_gmo_instance.hpp
View file @
7b73260c
...
...
@@ -92,7 +92,8 @@ struct DeviceOperationInstanceCreator<DeviceBatchedGemmSoftmaxGemmPermute<NumDim
C0DEElementwiseOperation
,
B1ElementwiseOperation
,
C1DEElementwiseOperation
,
MaskingSpec
>>
MaskingSpec
>
,
ArchitectureEnum
::
Xdl
>
{
static
auto
create_device_instances
()
{
...
...
src_example/01_gemm_bias_softmax_gemm_permute/gemm_bias_softmax_gemm_permute.cpp
View file @
7b73260c
...
...
@@ -135,7 +135,25 @@ int main()
// get device op instances
std
::
vector
<
std
::
unique_ptr
<
DeviceOp
>>
op_ptrs
;
ck
::
tensor_operation
::
device
::
instance
::
add_device_instances
(
op_ptrs
);
ck
::
tensor_operation
::
device
::
instance
::
add_device_instances
<
2
,
1
,
1
,
1
,
1
,
ADataType
,
B0DataType
,
B1DataType
,
CDataType
,
ck
::
Tuple
<
D00DataType
,
D01DataType
>
,
ck
::
Tuple
<>
,
AElementOp
,
B0ElementOp
,
Acc0ElementOp
,
B1ElementOp
,
CElementOp
,
MaskingSpec
,
ck
::
tensor_operation
::
device
::
instance
::
ArchitectureEnum
::
Xdl
>
(
op_ptrs
);
std
::
cout
<<
"found "
<<
op_ptrs
.
size
()
<<
" instances"
<<
std
::
endl
;
...
...
src_example/CMakeLists.txt
0 → 100644
View file @
7b73260c
cmake_minimum_required
(
VERSION 3.15
)
project
(
ck_app
)
add_compile_options
(
-std=c++17
)
find_package
(
composable_kernel 1.0.0 COMPONENTS device_operations
)
find_package
(
hip REQUIRED PATHS /opt/rocm
)
message
(
STATUS
"Build with HIP
${
hip_VERSION
}
"
)
# add all example subdir
file
(
GLOB dir_list LIST_DIRECTORIES true *
)
FOREACH
(
subdir
${
dir_list
}
)
IF
(
IS_DIRECTORY
"
${
subdir
}
"
AND
(
NOT
"
${
subdir
}
"
MATCHES
"build"
))
add_subdirectory
(
${
subdir
}
)
ENDIF
()
ENDFOREACH
()
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