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
bd70cb29
Commit
bd70cb29
authored
Feb 06, 2023
by
rocking
Browse files
Remove cstdlib and add constexpr
parent
ccf2ddfe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
7 deletions
+4
-7
example/21_gemm_layernorm/gemm_bias_relu_add_layernorm_xdl_naive_fp16.cpp
...layernorm/gemm_bias_relu_add_layernorm_xdl_naive_fp16.cpp
+1
-2
example/21_gemm_layernorm/gemm_bias_relu_add_layernorm_xdl_welford_fp16.cpp
...yernorm/gemm_bias_relu_add_layernorm_xdl_welford_fp16.cpp
+1
-2
example/21_gemm_layernorm/gemm_layernorm_xdl_naive_fp16.cpp
example/21_gemm_layernorm/gemm_layernorm_xdl_naive_fp16.cpp
+1
-2
example/21_gemm_layernorm/gemm_xdl_layernorm_naive_single_kernel_fp16.cpp
...layernorm/gemm_xdl_layernorm_naive_single_kernel_fp16.cpp
+1
-1
No files found.
example/21_gemm_layernorm/gemm_bias_relu_add_layernorm_xdl_naive_fp16.cpp
View file @
bd70cb29
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
#include <iostream>
#include <iostream>
#include <numeric>
#include <numeric>
#include <initializer_list>
#include <initializer_list>
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
...
@@ -116,7 +115,7 @@ auto f_host_tensor_descriptor2d =
...
@@ -116,7 +115,7 @@ auto f_host_tensor_descriptor2d =
[](
std
::
size_t
row
,
std
::
size_t
col
,
std
::
size_t
stride
,
auto
layout
)
{
[](
std
::
size_t
row
,
std
::
size_t
col
,
std
::
size_t
stride
,
auto
layout
)
{
using
namespace
ck
::
literals
;
using
namespace
ck
::
literals
;
if
(
std
::
is_same
<
decltype
(
layout
),
ck
::
tensor_layout
::
gemm
::
RowMajor
>::
value
)
if
constexpr
(
std
::
is_same
<
decltype
(
layout
),
ck
::
tensor_layout
::
gemm
::
RowMajor
>::
value
)
{
{
return
HostTensorDescriptor
({
row
,
col
},
{
stride
,
1
_uz
});
return
HostTensorDescriptor
({
row
,
col
},
{
stride
,
1
_uz
});
}
}
...
...
example/21_gemm_layernorm/gemm_bias_relu_add_layernorm_xdl_welford_fp16.cpp
View file @
bd70cb29
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
#include <iostream>
#include <iostream>
#include <numeric>
#include <numeric>
#include <initializer_list>
#include <initializer_list>
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
...
@@ -77,7 +76,7 @@ auto f_host_tensor_descriptor2d =
...
@@ -77,7 +76,7 @@ auto f_host_tensor_descriptor2d =
[](
std
::
size_t
row
,
std
::
size_t
col
,
std
::
size_t
stride
,
auto
layout
)
{
[](
std
::
size_t
row
,
std
::
size_t
col
,
std
::
size_t
stride
,
auto
layout
)
{
using
namespace
ck
::
literals
;
using
namespace
ck
::
literals
;
if
(
std
::
is_same
<
decltype
(
layout
),
ck
::
tensor_layout
::
gemm
::
RowMajor
>::
value
)
if
constexpr
(
std
::
is_same
<
decltype
(
layout
),
ck
::
tensor_layout
::
gemm
::
RowMajor
>::
value
)
{
{
return
HostTensorDescriptor
({
row
,
col
},
{
stride
,
1
_uz
});
return
HostTensorDescriptor
({
row
,
col
},
{
stride
,
1
_uz
});
}
}
...
...
example/21_gemm_layernorm/gemm_layernorm_xdl_naive_fp16.cpp
View file @
bd70cb29
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
#include <iostream>
#include <iostream>
#include <numeric>
#include <numeric>
#include <initializer_list>
#include <initializer_list>
#include <cstdlib>
#include "ck/ck.hpp"
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
...
@@ -115,7 +114,7 @@ auto f_host_tensor_descriptor2d =
...
@@ -115,7 +114,7 @@ auto f_host_tensor_descriptor2d =
[](
std
::
size_t
row
,
std
::
size_t
col
,
std
::
size_t
stride
,
auto
layout
)
{
[](
std
::
size_t
row
,
std
::
size_t
col
,
std
::
size_t
stride
,
auto
layout
)
{
using
namespace
ck
::
literals
;
using
namespace
ck
::
literals
;
if
(
std
::
is_same
<
decltype
(
layout
),
ck
::
tensor_layout
::
gemm
::
RowMajor
>::
value
)
if
constexpr
(
std
::
is_same
<
decltype
(
layout
),
ck
::
tensor_layout
::
gemm
::
RowMajor
>::
value
)
{
{
return
HostTensorDescriptor
({
row
,
col
},
{
stride
,
1
_uz
});
return
HostTensorDescriptor
({
row
,
col
},
{
stride
,
1
_uz
});
}
}
...
...
example/21_gemm_layernorm/gemm_xdl_layernorm_naive_single_kernel_fp16.cpp
View file @
bd70cb29
...
@@ -135,7 +135,7 @@ int main(int argc, char* argv[])
...
@@ -135,7 +135,7 @@ int main(int argc, char* argv[])
[](
std
::
size_t
row
,
std
::
size_t
col
,
std
::
size_t
stride
,
auto
layout
)
{
[](
std
::
size_t
row
,
std
::
size_t
col
,
std
::
size_t
stride
,
auto
layout
)
{
using
namespace
ck
::
literals
;
using
namespace
ck
::
literals
;
if
(
std
::
is_same
<
decltype
(
layout
),
ck
::
tensor_layout
::
gemm
::
RowMajor
>::
value
)
if
constexpr
(
std
::
is_same
<
decltype
(
layout
),
ck
::
tensor_layout
::
gemm
::
RowMajor
>::
value
)
{
{
return
HostTensorDescriptor
({
row
,
col
},
{
stride
,
1
_uz
});
return
HostTensorDescriptor
({
row
,
col
},
{
stride
,
1
_uz
});
}
}
...
...
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