MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / create_conv

Function create_conv

test/insert_pad_test.cpp:52–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52static migraphx::instruction_ref
53create_conv(migraphx::instruction_ref& l_img,
54 size_t channels,
55 migraphx::module& m,
56 migraphx::op::padding_mode_t padding_mode = migraphx::op::padding_mode_t::default_)
57{
58 migraphx::shape s_weights{migraphx::shape::int32_type, {4, channels, 3, 3}};
59 std::vector<int32_t> weights(4 * channels * 3 * 3);
60 auto l_weights = m.add_literal(migraphx::literal{s_weights, weights});
61 return m.add_instruction(
62 migraphx::make_op("convolution",
63 {{"padding_mode", padding_mode}, {"padding", {0, 0, 1, 1}}}),
64 l_img,
65 l_weights);
66}
67
68TEST_CASE(rewrite_pad)
69{

Callers 1

TEST_CASEFunction · 0.70

Calls 3

make_opFunction · 0.50
add_literalMethod · 0.45
add_instructionMethod · 0.45

Tested by

no test coverage detected