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
22214cae
Commit
22214cae
authored
Oct 17, 2023
by
Qianfeng Zhang
Browse files
Add seed input to GeneratorTensor_4 for normal_distribution generator
parent
0aa85235
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
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_tensor_generator.hpp
View file @
22214cae
...
@@ -130,10 +130,11 @@ struct GeneratorTensor_3<ck::bhalf_t>
...
@@ -130,10 +130,11 @@ struct GeneratorTensor_3<ck::bhalf_t>
template
<
typename
T
>
template
<
typename
T
>
struct
GeneratorTensor_4
struct
GeneratorTensor_4
{
{
std
::
default_random_engine
generator
;
std
::
mt19937
generator
;
std
::
normal_distribution
<
float
>
distribution
;
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
>
template
<
typename
...
Is
>
T
operator
()(
Is
...)
T
operator
()(
Is
...)
...
...
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