Commit 455d488f authored by Brian Pickrell's avatar Brian Pickrell
Browse files

fix test bug in compute()

parent 2ef739bd
...@@ -91,10 +91,11 @@ struct rand_uniform ...@@ -91,10 +91,11 @@ struct rand_uniform
} }
} }
argument compute(const shape& output, std::vector<argument>& args) const argument compute(const shape& output, std::vector<argument> args) const
{ {
(void)output; // Output goes into the passed buffer, not the shape output
argument& result{args[1]}; (void) output;
argument result{args[1].get_shape()};
uint32_t local_seed = args[0].at<uint32_t>(0); uint32_t local_seed = args[0].at<uint32_t>(0);
......
...@@ -6508,12 +6508,7 @@ TEST_CASE(rand_uniform_dyn_test) ...@@ -6508,12 +6508,7 @@ TEST_CASE(rand_uniform_dyn_test)
migraphx::shape seed_shape{migraphx::shape::uint32_type, {1}}; migraphx::shape seed_shape{migraphx::shape::uint32_type, {1}};
auto seed_input = mm->add_parameter("Seed", seed_shape); auto seed_input = mm->add_parameter("Seed", seed_shape);
mm->add_instruction(migraphx::make_op("rand_uniform", mm->add_instruction(migraphx::make_op("rand_uniform", {}), seed_input, input);
{
{"seed", seed + 1},
}),
input,
seed_input);
p.compile(migraphx::make_target("ref")); p.compile(migraphx::make_target("ref"));
// Create a dummy input to hold the random data // Create a dummy input to hold the random data
...@@ -6550,7 +6545,7 @@ TEST_CASE(rand_uniform_and_seed_test) ...@@ -6550,7 +6545,7 @@ TEST_CASE(rand_uniform_and_seed_test)
// Runtime randomization seed // Runtime randomization seed
auto seed_input = mm->add_instruction(migraphx::make_op("random_seed")); auto seed_input = mm->add_instruction(migraphx::make_op("random_seed"));
mm->add_instruction(migraphx::make_op("rand_uniform"), input, seed_input); mm->add_instruction(migraphx::make_op("rand_uniform"), seed_input, input);
p.compile(migraphx::make_target("ref")); p.compile(migraphx::make_target("ref"));
// Create a dummy input to hold the random data // Create a dummy input to hold the random data
......
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