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
6c971dc8
Commit
6c971dc8
authored
Oct 18, 2023
by
letaoqin
Browse files
Merge branch 'mha-train-develop' into mha-train-develop-fix-issupport
parents
b76c8e62
f27f9158
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
library/include/ck/library/utility/host_common_util.hpp
library/include/ck/library/utility/host_common_util.hpp
+1
-1
library/include/ck/library/utility/host_tensor_generator.hpp
library/include/ck/library/utility/host_tensor_generator.hpp
+3
-2
No files found.
library/include/ck/library/utility/host_common_util.hpp
View file @
6c971dc8
...
...
@@ -22,7 +22,7 @@ static inline void dumpBufferToFile(const char* fileName, T* data, size_t dataNu
std
::
ofstream
outFile
(
fileName
,
std
::
ios
::
binary
);
if
(
outFile
)
{
outFile
.
write
(
reinterpret_cast
<
char
*>
(
data
),
dataNumItems
*
sizeof
(
T
));
outFile
.
write
(
reinterpret_cast
<
const
char
*>
(
data
),
dataNumItems
*
sizeof
(
T
));
outFile
.
close
();
std
::
cout
<<
"Write output to file "
<<
fileName
<<
std
::
endl
;
}
...
...
library/include/ck/library/utility/host_tensor_generator.hpp
View file @
6c971dc8
...
...
@@ -130,10 +130,11 @@ struct GeneratorTensor_3<ck::bhalf_t>
template
<
typename
T
>
struct
GeneratorTensor_4
{
std
::
default_random_engine
generator
;
std
::
mt19937
generator
;
std
::
normal_distribution
<
float
>
distribution
;
GeneratorTensor_4
(
float
mean
,
float
stddev
)
:
generator
(
1
),
distribution
(
mean
,
stddev
){};
GeneratorTensor_4
(
float
mean
,
float
stddev
,
unsigned
int
seed
=
1
)
:
generator
(
seed
),
distribution
(
mean
,
stddev
){};
template
<
typename
...
Is
>
T
operator
()(
Is
...)
...
...
Prev
1
2
Next
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