Commit e4fc4d67 authored by Paul's avatar Paul
Browse files

Improve outputs of load

parent 62ab25fc
......@@ -1174,9 +1174,19 @@ struct load
}
argument compute(const shape&, const std::vector<argument>& args) const
{
if ((offset + s.bytes()) > args[0].get_shape().bytes())
MIGRAPHX_THROW("Load access is out of bounds");
return {s, args[0].data() + offset};
}
int output_alias(const std::vector<shape>&) const { return 0; }
friend std::ostream& operator<<(std::ostream& os, const load& op)
{
os << op.name() << "[";
os << "offset=" << op.offset << ",";
os << "end=" << (op.offset + op.s.bytes()) << "]";
return os;
}
};
struct outline
......
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