"src/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "d0c3a01d9e3979cfd7a435d65dde232edd4e383d"
Commit 07fc3c2d authored by Paul's avatar Paul
Browse files

Check for flag

parent fdcb8d92
......@@ -24,8 +24,7 @@ struct miopen_quant_convolution
{
// TODO: Add algo
// return op::quant_convolution::reflect(self.op, f);
return pack(f(self.op, "op"),
f(self.int8_x4_format, "int8_x4_format"));
return pack(f(self.op, "op"), f(self.int8_x4_format, "int8_x4_format"));
}
std::string name() const { return "gpu::quant_convolution"; }
......
......@@ -156,6 +156,7 @@ void pack_int8_args::apply(module& m) const
}
else if(ins->name() == "gpu::quant_convolution")
{
// TODO: Check for int8_x4_format
auto inputs = ins->inputs();
auto packed_x = m.insert_instruction(
ins,
......
......@@ -16,8 +16,8 @@ argument miopen_quant_convolution::compute(context& ctx,
const shape& output_shape,
const std::vector<argument>& args) const
{
auto x_desc = make_tensor(args[0].get_shape(), true);
auto w_desc = make_tensor(args[1].get_shape(), true);
auto x_desc = make_tensor(args[0].get_shape(), int8_x4_format);
auto w_desc = make_tensor(args[1].get_shape(), int8_x4_format);
auto y_desc = make_tensor(output_shape);
float alpha = 1;
......@@ -49,8 +49,8 @@ shape miopen_quant_convolution::compile(context& ctx,
std::vector<shape> inputs)
{
shape workspace_shape{};
auto x_desc = make_tensor(inputs[0], true);
auto w_desc = make_tensor(inputs[1], true);
auto x_desc = make_tensor(inputs[0], int8_x4_format);
auto w_desc = make_tensor(inputs[1], int8_x4_format);
auto y_desc = make_tensor(output_shape);
std::size_t workspace_size = 0;
......@@ -62,6 +62,7 @@ shape miopen_quant_convolution::compile(context& ctx,
&workspace_size);
workspace_shape = shape{shape::int8_type, {workspace_size}};
// TODO: use pack_int8_shape only when pack_int8_shape is true
auto arg_vec4_x = to_gpu(generate_argument(pack_int8_shape(inputs[0])));
auto arg_vec4_w = to_gpu(generate_argument(pack_int8_shape(inputs[1])));
auto y = allocate_gpu(output_shape);
......
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