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
649af8b2
Commit
649af8b2
authored
Dec 15, 2020
by
Jing Zhang
Browse files
simply vector type At
parent
159559c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
composable_kernel/include/tensor_operation/threadwise_generic_tensor_slice_copy_v2.hpp
...sor_operation/threadwise_generic_tensor_slice_copy_v2.hpp
+2
-2
composable_kernel/include/utility/float_type.amd.hpp.in
composable_kernel/include/utility/float_type.amd.hpp.in
+15
-15
No files found.
composable_kernel/include/tensor_operation/threadwise_generic_tensor_slice_copy_v2.hpp
View file @
649af8b2
...
@@ -197,7 +197,7 @@ struct ThreadwiseGenericTensorSliceCopy_v5
...
@@ -197,7 +197,7 @@ struct ThreadwiseGenericTensorSliceCopy_v5
ThreadBufferDesc
::
CalculateOffset
(
to_multi_index
(
long_vector_data_begin_id
))
/
ThreadBufferDesc
::
CalculateOffset
(
to_multi_index
(
long_vector_data_begin_id
))
/
long_vector_size
;
long_vector_size
;
thread_buff
.
template
At
<
SrcDataPerRead
>
(
)(
Number
<
buff_off
>
{})
=
src_buff
;
thread_buff
.
At
(
Number
<
SrcDataPerRead
>
{}
)(
Number
<
buff_off
>
{})
=
src_buff
;
});
});
}
}
...
@@ -225,7 +225,7 @@ struct ThreadwiseGenericTensorSliceCopy_v5
...
@@ -225,7 +225,7 @@ struct ThreadwiseGenericTensorSliceCopy_v5
ThreadBufferDesc
::
CalculateOffset
(
to_multi_index
(
long_vector_data_begin_id
))
/
ThreadBufferDesc
::
CalculateOffset
(
to_multi_index
(
long_vector_data_begin_id
))
/
long_vector_size
;
long_vector_size
;
auto
src_buff
=
thread_buff
.
template
At
<
DstDataPerWrite
>
(
)[
Number
<
buff_off
>
{}];
auto
src_buff
=
thread_buff
.
At
(
Number
<
DstDataPerWrite
>
{}
)[
Number
<
buff_off
>
{}];
const
auto
dst_coord
=
mDstSliceOrigin
+
to_multi_index
(
long_vector_data_begin_id
);
const
auto
dst_coord
=
mDstSliceOrigin
+
to_multi_index
(
long_vector_data_begin_id
);
...
...
composable_kernel/include/utility/float_type.amd.hpp.in
View file @
649af8b2
...
@@ -37,22 +37,22 @@ union float_vec4_t
...
@@ -37,22 +37,22 @@ union float_vec4_t
__host__ __device__ constexpr float_vec4_t() {}
__host__ __device__ constexpr float_vec4_t() {}
template <index_t vs>
template <index_t vs>
__host__ __device__ auto& At();
__host__ __device__ auto& At(
Number<vs>
);
template <>
template <>
__host__ __device__ auto& At<1>
(
)
__host__ __device__ auto& At
(Number
<1>)
{
{
return s1;
return s1;
}
}
template <>
template <>
__host__ __device__ auto& At<2>
(
)
__host__ __device__ auto& At
(Number
<2>)
{
{
return s2;
return s2;
}
}
template <>
template <>
__host__ __device__ auto& At<4>
(
)
__host__ __device__ auto& At
(Number
<4>)
{
{
return s4;
return s4;
}
}
...
@@ -67,28 +67,28 @@ union float_vec8_t
...
@@ -67,28 +67,28 @@ union float_vec8_t
__host__ __device__ constexpr float_vec8_t() {}
__host__ __device__ constexpr float_vec8_t() {}
template <index_t vs>
template <index_t vs>
__host__ __device__ auto& At();
__host__ __device__ auto& At(
Number<vs>
);
template <>
template <>
__host__ __device__ auto& At<1>
(
)
__host__ __device__ auto& At
(Number
<1>)
{
{
return s1;
return s1;
}
}
template <>
template <>
__host__ __device__ auto& At<2>
(
)
__host__ __device__ auto& At
(Number
<2>)
{
{
return s2;
return s2;
}
}
template <>
template <>
__host__ __device__ auto& At<4>
(
)
__host__ __device__ auto& At
(Number
<4>)
{
{
return s4;
return s4;
}
}
template <>
template <>
__host__ __device__ auto& At<8>
(
)
__host__ __device__ auto& At
(Number
<8>)
{
{
return s8;
return s8;
}
}
...
@@ -104,34 +104,34 @@ union float_vec16_t
...
@@ -104,34 +104,34 @@ union float_vec16_t
__host__ __device__ constexpr float_vec16_t() {}
__host__ __device__ constexpr float_vec16_t() {}
template <index_t vs>
template <index_t vs>
__host__ __device__ auto& At();
__host__ __device__ auto& At(
Number<vs>
);
template <>
template <>
__host__ __device__ auto& At<1>
(
)
__host__ __device__ auto& At
(Number
<1>)
{
{
return s1;
return s1;
}
}
template <>
template <>
__host__ __device__ auto& At<2>
(
)
__host__ __device__ auto& At
(Number
<2>)
{
{
return s2;
return s2;
}
}
template <>
template <>
__host__ __device__ auto& At<4>
(
)
__host__ __device__ auto& At
(Number
<4>)
{
{
return s4;
return s4;
}
}
template <>
template <>
__host__ __device__ auto& At<8>
(
)
__host__ __device__ auto& At
(Number
<8>)
{
{
return s8;
return s8;
}
}
template <>
template <>
__host__ __device__ auto& At<16>
(
)
__host__ __device__ auto& At
(Number
<16>)
{
{
return s16;
return s16;
}
}
...
...
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