Commit 61875aee authored by umangyadav's avatar umangyadav
Browse files

Modify fill_argument to take "double" value instead of Unsigned value

parent d6078383
......@@ -26,7 +26,7 @@
namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
argument fill_argument(shape s, unsigned long value)
argument fill_argument(shape s, double value)
{
argument result;
if(s.type() == shape::tuple_type)
......@@ -77,7 +77,7 @@ argument generate_argument(shape s, unsigned long seed)
{
using type = typename decltype(as)::type;
auto v = generate_tensor_data<type>(s, seed);
result = {s, v};
result = {s, v};
}
});
}
......
......@@ -117,14 +117,14 @@ auto generate_tensor_data(const migraphx::shape& s, unsigned long seed = 0)
}
template <class T>
auto fill_tensor_data(const migraphx::shape& s, unsigned long value = 0)
auto fill_tensor_data(const migraphx::shape& s, double value = 0)
{
auto result = make_shared_array<T>(s.element_space());
std::generate(result.get(), result.get() + s.element_space(), [=] { return value; });
return result;
}
MIGRAPHX_EXPORT argument fill_argument(shape s, unsigned long value = 0);
MIGRAPHX_EXPORT argument fill_argument(shape s, double value = 0);
MIGRAPHX_EXPORT argument generate_argument(shape s, unsigned long seed = 0);
......
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