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_ROCM
Commits
1e054452
Commit
1e054452
authored
Feb 04, 2025
by
Andriy Roshchenko
Browse files
WIP: Reduce output and narrow down value variations
parent
70c70d6c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
+25
-14
test/mx_mfma_op/mx_mfma_op.hpp
test/mx_mfma_op/mx_mfma_op.hpp
+25
-14
No files found.
test/mx_mfma_op/mx_mfma_op.hpp
View file @
1e054452
...
@@ -879,27 +879,34 @@ struct TestMXMFMA
...
@@ -879,27 +879,34 @@ struct TestMXMFMA
break
;
break
;
case
2
:
case
2
:
// expect small round off errors
// expect small round off errors
a_m_k
.
GenerateTensorValue
(
GeneratorTensor_3
<
ADataType
>
{
-
0.5
,
0.5
});
a_m_k
.
GenerateTensorValue
(
GeneratorTensor_3
<
ADataType
>
{
-
2.0
,
2.0
});
// a_m_k.GenerateTensorValue(GeneratorTensor_1<ADataType>{1.9f});
a_scales
.
GenerateTensorValue
(
a_scales
.
GenerateTensorValue
(
GeneratorTensor_2
<
ScaleType
>
{
127
,
129
});
// scales: {0.5, 1, 2}
GeneratorTensor_2
<
ScaleType
>
{
127
,
129
});
// 1, 2 // scales: {0.5, 1, 2}
// a_scales.GenerateTensorValue(GeneratorTensor_1<ScaleType>{ScaleType{1.0f}});
// b_n_k.GenerateTensorValue(GeneratorTensor_3<BDataType>{-5, 5});
// b_scales.GenerateTensorValue(
// GeneratorTensor_2<ScaleType>{125, 128}); // scales: {0.5, 1, 2}
b_n_k
.
GenerateTensorValue
(
GeneratorTensor_1
<
BDataType
>
{
1.0
f
});
b_n_k
.
GenerateTensorValue
(
GeneratorTensor_1
<
BDataType
>
{
1.0
f
});
b_scales
.
GenerateTensorValue
(
GeneratorTensor_1
<
ScaleType
>
{
ScaleType
{
1.0
f
}});
b_scales
.
GenerateTensorValue
(
GeneratorTensor_1
<
ScaleType
>
{
ScaleType
{
1.0
f
}});
break
;
break
;
case
3
:
case
3
:
// expect small round off errors
// expect small round off errors
a_m_k
.
GenerateTensorValue
(
GeneratorTensor_4
<
ADataType
>
(
-
1
,
3
));
a_m_k
.
GenerateTensorValue
(
GeneratorTensor_3
<
ADataType
>
{
-
2.0
,
2.0
});
a_scales
.
GenerateTensorValue
(
a_scales
.
GenerateTensorValue
(
GeneratorTensor_2
<
ScaleType
>
{
128
,
129
});
// 2
GeneratorTensor_2
<
ScaleType
>
{
126
,
129
});
// scales: {0.5, 1, 2}
b_n_k
.
GenerateTensorValue
(
GeneratorTensor_4
<
BDataType
>
(
1
,
3
));
// a_scales.GenerateTensorValue(GeneratorTensor_1<ScaleType>{ScaleType{1.0f}});
b_scales
.
GenerateTensorValue
(
GeneratorTensor_2
<
ScaleType
>
{
126
,
129
});
// scales: {0.5, 1, 2}
b_n_k
.
GenerateTensorValue
(
GeneratorTensor_1
<
BDataType
>
{
1.0
f
});
b_scales
.
GenerateTensorValue
(
GeneratorTensor_1
<
ScaleType
>
{
ScaleType
{
1.0
f
}});
break
;
break
;
// case 3:
// // expect small round off errors
// a_m_k.GenerateTensorValue(GeneratorTensor_4<ADataType>(-1, 3));
// a_scales.GenerateTensorValue(
// GeneratorTensor_2<ScaleType>{126, 129}); // scales: {0.5, 1, 2}
// b_n_k.GenerateTensorValue(GeneratorTensor_4<BDataType>(1, 3));
// b_scales.GenerateTensorValue(
// GeneratorTensor_2<ScaleType>{126, 129}); // scales: {0.5, 1, 2}
// break;
case
4
:
case
4
:
a_m_k
.
GenerateTensorValue
(
GeneratorTensor_1
<
ADataType
>
{
1.0
f
});
a_m_k
.
GenerateTensorValue
(
GeneratorTensor_1
<
ADataType
>
{
1.0
f
});
a_scales
.
GenerateTensorValue
(
GeneratorTensor_Sequential
<
ScaleType
,
0
>
{
-
9
});
a_scales
.
GenerateTensorValue
(
GeneratorTensor_Sequential
<
ScaleType
,
0
>
{
-
9
});
...
@@ -993,12 +1000,14 @@ struct TestMXMFMA
...
@@ -993,12 +1000,14 @@ struct TestMXMFMA
std
::
cout
<<
type_convert
<
float
>
(
a
(
i
,
j
))
<<
" "
;
std
::
cout
<<
type_convert
<
float
>
(
a
(
i
,
j
))
<<
" "
;
}
}
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
break
;
}
}
std
::
cout
<<
"b:"
<<
std
::
endl
;
std
::
cout
<<
"b:"
<<
std
::
endl
;
for
(
size_t
i
=
0
;
i
<
BLOCK_K
;
i
++
)
for
(
size_t
i
=
0
;
i
<
BLOCK_K
;
i
++
)
{
{
for
(
size_t
j
=
0
;
j
<
BLOCK_N
;
j
++
)
for
(
size_t
j
=
0
;
j
<
BLOCK_N
;
j
++
)
{
{
if
(
j
==
0
)
std
::
cout
<<
type_convert
<
float
>
(
b
(
i
,
j
))
<<
" "
;
std
::
cout
<<
type_convert
<
float
>
(
b
(
i
,
j
))
<<
" "
;
}
}
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
...
@@ -1032,6 +1041,7 @@ struct TestMXMFMA
...
@@ -1032,6 +1041,7 @@ struct TestMXMFMA
std
::
cout
<<
type_convert
<
float
>
(
c_device
(
i
,
j
))
<<
" "
;
std
::
cout
<<
type_convert
<
float
>
(
c_device
(
i
,
j
))
<<
" "
;
}
}
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
break
;
}
}
#endif
#endif
...
@@ -1054,6 +1064,7 @@ struct TestMXMFMA
...
@@ -1054,6 +1064,7 @@ struct TestMXMFMA
std
::
cout
<<
type_convert
<
float
>
(
c_host
(
i
,
j
))
<<
" "
;
std
::
cout
<<
type_convert
<
float
>
(
c_host
(
i
,
j
))
<<
" "
;
}
}
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
break
;
}
}
}
}
}
}
...
...
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