"git@developer.sourcefind.cn:ox696c/ktransformers.git" did not exist on "2753a4a65488f7e26556dd1d4d2923121a956fe6"
Commit c27eb2ae authored by Brian Pickrell's avatar Brian Pickrell
Browse files

formatting

parent eb6ac6a5
...@@ -23,22 +23,20 @@ ...@@ -23,22 +23,20 @@
*/ */
/** /**
* Random Uniform distribution operator. Given a shape, populate it with random * Random Uniform distribution operator. Given a shape, populate it with random
* values. Calls to rand_uniform using the same randomization seed will * values. Calls to rand_uniform using the same randomization seed will
* always generate the same pseudo-random sequence. Seed can * always generate the same pseudo-random sequence. Seed can
* be given as a runtime argument containing a single value, or a compile-time * be given as a runtime argument containing a single value, or a compile-time
* attribute. * attribute.
* *
* Inputs: (1) the shape of the set to be populated. * Inputs: (1) the shape of the set to be populated.
* (2) randomization seed (uint32). If not given at inference time, the attribute value, * (2) randomization seed (uint32). If not given at inference time, the attribute
* or auto seeding, will be used. * value, or auto seeding, will be used. Attributes: use_auto_seed bool Have hardware generate
* Attributes: * random seed at runtime, overriding the attribute seed seed uint32 Randomization seed
* use_auto_seed bool Have hardware generate random seed at runtime, overriding the attribute seed
* seed uint32 Randomization seed
* *
* Output: Same shape. * Output: Same shape.
* *
*/ */
#ifndef MIGRAPHX_GUARD_OPERATORS_MULTINOMIAL_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_MULTINOMIAL_HPP
#define MIGRAPHX_GUARD_OPERATORS_MULTINOMIAL_HPP #define MIGRAPHX_GUARD_OPERATORS_MULTINOMIAL_HPP
...@@ -58,18 +56,17 @@ struct rand_uniform ...@@ -58,18 +56,17 @@ struct rand_uniform
bool use_auto_seed = false; bool use_auto_seed = false;
// todo: not currently settable // todo: not currently settable
float range_min = 0.0f; float range_min = 0.0f;
float range_max = 1.0f; float range_max = 1.0f;
// todo: integer data type(s) not yet supported // 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> template <class Self, class F>
static auto reflect(Self& self, F f) static auto reflect(Self& self, F f)
{ {
return pack(f(self.dtype, "dtype"), return pack(
f(self.seed, "seed"), f(self.dtype, "dtype"), f(self.seed, "seed"), f(self.use_auto_seed, "use_auto_seed"));
f(self.use_auto_seed, "use_auto_seed"));
} }
std::string name() const { return "rand_uniform"; } std::string name() const { return "rand_uniform"; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment