Commit 08c3377f authored by umangyadav's avatar umangyadav
Browse files

Fix assert

parent 3265b9f0
......@@ -77,7 +77,7 @@ void migraphx_from_value(const value& v, literal& l)
auto v_data = v.at("data");
assert(v_data.is_array());
size_t array_size = 1 + ((binary_size - 1) / partition_length);
assert(array_size == v.size());
assert(array_size == v_data.size());
std::vector<uint8_t> binary_array(binary_size);
size_t read_size = 0;
for(size_t i = 0; i < array_size; ++i)
......
......@@ -25,8 +25,8 @@
#include <migraphx/register_target.hpp>
#include <migraphx/load_save.hpp>
#include <migraphx/generate.hpp>
#include "test.hpp"
#include <migraphx/make_op.hpp>
#include "test.hpp"
#include <cstdio>
......@@ -93,6 +93,7 @@ TEST_CASE(large_literal)
{
migraphx::program p1;
auto* mm = p1.get_main_module();
// literal with ~~5GB size
mm->add_literal(migraphx::generate_literal({migraphx::shape::half_type, {39664984, 64}}));
std::vector<char> buffer = migraphx::save_buffer(p1);
migraphx::program p2 = migraphx::load_buffer(buffer);
......
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