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
9a54fbd8
Commit
9a54fbd8
authored
Dec 15, 2020
by
Jing Zhang
Browse files
clean code
parent
be11c5dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
composable_kernel/include/tensor_operation/blockwise_generic_tensor_slice_copy_v2.hpp
...nsor_operation/blockwise_generic_tensor_slice_copy_v2.hpp
+0
-2
composable_kernel/include/tensor_operation/threadwise_generic_tensor_slice_copy_v2.hpp
...sor_operation/threadwise_generic_tensor_slice_copy_v2.hpp
+4
-3
No files found.
composable_kernel/include/tensor_operation/blockwise_generic_tensor_slice_copy_v2.hpp
View file @
9a54fbd8
...
@@ -141,14 +141,12 @@ struct BlockwiseGenericTensorSliceCopy_v5
...
@@ -141,14 +141,12 @@ struct BlockwiseGenericTensorSliceCopy_v5
private:
private:
using
ThreadBufferDesc
=
decltype
(
make_native_tensor_descriptor_packed
(
ThreadSliceLengths
{}));
using
ThreadBufferDesc
=
decltype
(
make_native_tensor_descriptor_packed
(
ThreadSliceLengths
{}));
using
ThreadBufferType
=
decltype
(
GetRegBuffer
<
float
,
GetThreadBufferSize
()
>
());
using
ThreadwiseCopy
=
ThreadwiseGenericTensorSliceCopy_v5
<
BlockSrcDesc
,
using
ThreadwiseCopy
=
ThreadwiseGenericTensorSliceCopy_v5
<
BlockSrcDesc
,
BlockDstDesc
,
BlockDstDesc
,
ThreadSliceLengths
,
ThreadSliceLengths
,
SrcDimAccessOrder
,
SrcDimAccessOrder
,
DstDimAccessOrder
,
DstDimAccessOrder
,
ThreadBufferType
,
SrcVectoReadDim
,
SrcVectoReadDim
,
DstVectorWriteDim
,
DstVectorWriteDim
,
SrcDataPerRead
,
SrcDataPerRead
,
...
...
composable_kernel/include/tensor_operation/threadwise_generic_tensor_slice_copy_v2.hpp
View file @
9a54fbd8
...
@@ -19,7 +19,6 @@ template <typename SrcDesc,
...
@@ -19,7 +19,6 @@ template <typename SrcDesc,
typename
SliceLengths
,
typename
SliceLengths
,
typename
SrcDimAccessOrder
,
typename
SrcDimAccessOrder
,
typename
DstDimAccessOrder
,
typename
DstDimAccessOrder
,
typename
BufferVectorType
,
index_t
SrcVectorReadDim
,
index_t
SrcVectorReadDim
,
index_t
DstVectorWriteDim
,
index_t
DstVectorWriteDim
,
index_t
SrcDataPerRead
,
index_t
SrcDataPerRead
,
...
@@ -35,6 +34,10 @@ struct ThreadwiseGenericTensorSliceCopy_v5
...
@@ -35,6 +34,10 @@ struct ThreadwiseGenericTensorSliceCopy_v5
static
constexpr
index_t
ThreadBufferSize
=
ThreadBufferDesc
::
GetElementSpace
();
static
constexpr
index_t
ThreadBufferSize
=
ThreadBufferDesc
::
GetElementSpace
();
using
ThreadBufferType
=
decltype
(
GetRegBuffer
<
float
,
ThreadBufferSize
>
());
ThreadBufferType
thread_buff
;
static
constexpr
index_t
nDim
=
SliceLengths
::
Size
();
static
constexpr
index_t
nDim
=
SliceLengths
::
Size
();
using
Index
=
MultiIndex
<
nDim
>
;
using
Index
=
MultiIndex
<
nDim
>
;
...
@@ -253,8 +256,6 @@ struct ThreadwiseGenericTensorSliceCopy_v5
...
@@ -253,8 +256,6 @@ struct ThreadwiseGenericTensorSliceCopy_v5
.
Else
([
&
](
auto
)
{
mDstSliceOrigin
-=
step_sizes
;
});
.
Else
([
&
](
auto
)
{
mDstSliceOrigin
-=
step_sizes
;
});
}
}
BufferVectorType
thread_buff
;
private:
private:
SrcCoord
mSrcSliceOrigin
;
SrcCoord
mSrcSliceOrigin
;
DstCoord
mDstSliceOrigin
;
DstCoord
mDstSliceOrigin
;
...
...
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