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
MIGraphX
Commits
c27eb2ae
Commit
c27eb2ae
authored
Aug 09, 2023
by
Brian Pickrell
Browse files
formatting
parent
eb6ac6a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
src/include/migraphx/op/rand_uniform.hpp
src/include/migraphx/op/rand_uniform.hpp
+12
-15
No files found.
src/include/migraphx/op/rand_uniform.hpp
View file @
c27eb2ae
...
...
@@ -23,22 +23,20 @@
*/
/**
* Random Uniform distribution operator. Given a shape, populate it with random
* values. Calls to rand_uniform using the same randomization seed will
* always generate the same pseudo-random sequence. Seed can
* Random Uniform distribution operator. Given a shape, populate it with random
* values. Calls to rand_uniform using the same randomization seed will
* always generate the same pseudo-random sequence. Seed can
* be given as a runtime argument containing a single value, or a compile-time
* attribute.
*
* Inputs: (1) the shape of the set to be populated.
* (2) randomization seed (uint32). If not given at inference time, the attribute value,
* or auto seeding, will be used.
* Attributes:
* use_auto_seed bool Have hardware generate random seed at runtime, overriding the attribute seed
* seed uint32 Randomization seed
* (2) randomization seed (uint32). If not given at inference time, the attribute
* value, or auto seeding, will be used. Attributes: use_auto_seed bool Have hardware generate
* random seed at runtime, overriding the attribute seed seed uint32 Randomization seed
*
* Output: Same shape.
*
*/
*/
#ifndef MIGRAPHX_GUARD_OPERATORS_MULTINOMIAL_HPP
#define MIGRAPHX_GUARD_OPERATORS_MULTINOMIAL_HPP
...
...
@@ -58,18 +56,17 @@ struct rand_uniform
bool
use_auto_seed
=
false
;
// todo: not currently settable
float
range_min
=
0.0
f
;
float
range_max
=
1.0
f
;
float
range_min
=
0.0
f
;
float
range_max
=
1.0
f
;
// todo: integer data type(s) not yet supported
shape
::
type_t
dtype
=
shape
::
type_t
::
float_type
;
shape
::
type_t
dtype
=
shape
::
type_t
::
float_type
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
pack
(
f
(
self
.
dtype
,
"dtype"
),
f
(
self
.
seed
,
"seed"
),
f
(
self
.
use_auto_seed
,
"use_auto_seed"
));
return
pack
(
f
(
self
.
dtype
,
"dtype"
),
f
(
self
.
seed
,
"seed"
),
f
(
self
.
use_auto_seed
,
"use_auto_seed"
));
}
std
::
string
name
()
const
{
return
"rand_uniform"
;
}
...
...
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