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
4dab86fe
Commit
4dab86fe
authored
Oct 26, 2023
by
Astha Rai
Browse files
update profiler and client example tensor layouts
parent
0f8c6a60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
client_example/23_elementwise_transpose/elementwise_transpose_3d.cpp
...ple/23_elementwise_transpose/elementwise_transpose_3d.cpp
+2
-2
example/44_elementwise_permute/elementwise_permute_3d_ndhwc.cpp
...e/44_elementwise_permute/elementwise_permute_3d_ndhwc.cpp
+1
-1
profiler/include/profiler/profile_transpose_impl.hpp
profiler/include/profiler/profile_transpose_impl.hpp
+5
-5
No files found.
client_example/23_elementwise_transpose/elementwise_transpose_3d.cpp
View file @
4dab86fe
...
@@ -48,8 +48,8 @@ int main()
...
@@ -48,8 +48,8 @@ int main()
auto
size
=
N
*
C
*
D
*
H
*
W
;
auto
size
=
N
*
C
*
D
*
H
*
W
;
std
::
array
<
ck
::
index_t
,
5
>
ab_lengths
{
N
,
C
,
H
,
W
,
D
};
std
::
array
<
ck
::
index_t
,
5
>
ab_lengths
{
N
,
C
,
H
,
W
,
D
};
std
::
array
<
ck
::
index_t
,
5
>
a_strides
=
{
C
*
D
*
H
*
W
,
D
*
H
*
W
,
1
,
D
*
H
,
D
};
std
::
array
<
ck
::
index_t
,
5
>
a_strides
=
{
C
*
D
*
H
*
W
,
H
*
W
,
W
,
1
,
D
*
H
*
W
};
// N
,
C
, D
,
H,
W
std
::
array
<
ck
::
index_t
,
5
>
b_strides
=
{
C
*
H
*
W
*
D
,
H
*
W
*
D
,
W
*
D
,
D
,
1
};
std
::
array
<
ck
::
index_t
,
5
>
b_strides
=
{
C
*
H
*
W
*
D
,
H
*
W
*
D
,
W
*
D
,
D
,
1
};
// N, C, H, W, D
SimpleDeviceMem
a_dev_buf
(
sizeof
(
ADataType
)
*
size
);
SimpleDeviceMem
a_dev_buf
(
sizeof
(
ADataType
)
*
size
);
SimpleDeviceMem
b_dev_buf
(
sizeof
(
BDataType
)
*
size
);
SimpleDeviceMem
b_dev_buf
(
sizeof
(
BDataType
)
*
size
);
...
...
example/44_elementwise_permute/elementwise_permute_3d_ndhwc.cpp
View file @
4dab86fe
...
@@ -73,7 +73,7 @@ int main()
...
@@ -73,7 +73,7 @@ int main()
std
::
array
<
ck
::
index_t
,
5
>
ab_lengths
{
N
,
C
,
H
,
W
,
D
};
std
::
array
<
ck
::
index_t
,
5
>
ab_lengths
{
N
,
C
,
H
,
W
,
D
};
std
::
array
<
ck
::
index_t
,
5
>
a_strides
=
{
C
*
D
*
H
*
W
,
H
*
W
,
W
,
1
,
D
*
H
*
W
};
// N, C, D, H, W
std
::
array
<
ck
::
index_t
,
5
>
a_strides
=
{
C
*
D
*
H
*
W
,
H
*
W
,
W
,
1
,
D
*
H
*
W
};
// N, C, D, H, W
std
::
array
<
ck
::
index_t
,
5
>
b_strides
=
{
C
*
H
*
W
*
D
,
H
*
W
*
D
,
W
*
D
,
D
,
1
};
// N,
C
, H, W,
D
std
::
array
<
ck
::
index_t
,
5
>
b_strides
=
{
C
*
H
*
W
*
D
,
H
*
W
*
D
,
W
*
D
,
D
,
1
};
// N,
D
, H, W,
C
auto
broadcastPermute
=
DeviceElementwisePermuteInstance
{};
auto
broadcastPermute
=
DeviceElementwisePermuteInstance
{};
auto
argument
=
broadcastPermute
.
MakeArgumentPointer
(
auto
argument
=
broadcastPermute
.
MakeArgumentPointer
(
...
...
profiler/include/profiler/profile_transpose_impl.hpp
View file @
4dab86fe
...
@@ -38,9 +38,9 @@ bool profile_gemm_splitk_impl(int do_verification,
...
@@ -38,9 +38,9 @@ bool profile_gemm_splitk_impl(int do_verification,
bool
pass
=
true
;
bool
pass
=
true
;
std
::
vector
<
std
::
size_t
>
ncdhw
=
{
N
,
C
,
D
,
H
,
W
};
std
::
vector
<
std
::
size_t
>
ncdhw
=
{
N
,
C
,
D
,
H
,
W
};
std
::
vector
<
std
::
size_t
>
n
c
hw
d
=
{
N
,
C
,
H
,
W
,
D
};
std
::
vector
<
std
::
size_t
>
n
d
hw
c
=
{
N
,
D
,
H
,
W
,
C
};
Tensor
<
ADataType
>
a
(
ncdhw
);
Tensor
<
ADataType
>
a
(
ncdhw
);
Tensor
<
BDataType
>
b
(
n
c
hw
d
);
Tensor
<
BDataType
>
b
(
n
d
hw
c
);
// a.GenerateTensorValue(GeneratorTensor_3<ADataType>{0.0, 1.0});
// a.GenerateTensorValue(GeneratorTensor_3<ADataType>{0.0, 1.0});
...
@@ -48,8 +48,8 @@ bool profile_gemm_splitk_impl(int do_verification,
...
@@ -48,8 +48,8 @@ bool profile_gemm_splitk_impl(int do_verification,
std
::
array
<
void
*
,
1
>
output
=
{
b_device_buf
.
GetDeviceBuffer
()};
std
::
array
<
void
*
,
1
>
output
=
{
b_device_buf
.
GetDeviceBuffer
()};
std
::
array
<
ck
::
index_t
,
5
>
ab_lengths
{
N
,
C
,
H
,
W
,
D
};
std
::
array
<
ck
::
index_t
,
5
>
ab_lengths
{
N
,
C
,
H
,
W
,
D
};
std
::
array
<
ck
::
index_t
,
5
>
a_strides
=
{
C
*
D
*
H
*
W
,
D
*
H
*
W
,
1
,
D
*
H
,
D
};
std
::
array
<
ck
::
index_t
,
5
>
a_strides
=
{
C
*
D
*
H
*
W
,
H
*
W
,
W
,
1
,
D
*
H
*
W
};
// N
,
C
, D
,
H,
W
std
::
array
<
ck
::
index_t
,
5
>
b_strides
=
{
C
*
H
*
W
*
D
,
H
*
W
*
D
,
W
*
D
,
D
,
1
};
std
::
array
<
ck
::
index_t
,
5
>
b_strides
=
{
C
*
H
*
W
*
D
,
H
*
W
*
D
,
W
*
D
,
D
,
1
};
// N, D, H, W, C
std
::
cout
<<
"A: "
<<
a
.
mDesc
<<
std
::
endl
;
std
::
cout
<<
"A: "
<<
a
.
mDesc
<<
std
::
endl
;
std
::
cout
<<
"B: "
<<
b
.
mDesc
<<
std
::
endl
;
std
::
cout
<<
"B: "
<<
b
.
mDesc
<<
std
::
endl
;
...
@@ -192,4 +192,4 @@ return pass;
...
@@ -192,4 +192,4 @@ return pass;
}
}
}
// namespace profiler
}
// namespace profiler
}
// namespace ck
}
// namespace ck
\ No newline at end of file
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