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

Function create_pointwise_module

test/include/pointwise.hpp:34–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33template <class F>
34migraphx::module_ref create_pointwise_module(migraphx::program& p,
35 const std::string& name,
36 std::vector<migraphx::instruction_ref> inputs,
37 const F& f)
38{
39 auto* pm = p.create_module(name);
40 pm->set_bypass();
41 std::vector<migraphx::instruction_ref> params;
42 std::transform(inputs.begin(), inputs.end(), std::back_inserter(params), [&](auto input) {
43 return pm->add_parameter("x" + std::to_string(params.size()),
44 migraphx::shape{input->get_shape().type()});
45 });
46 auto r = f(pm, params);
47 pm->add_return({r});
48 return pm;
49}
50
51template <class F>
52migraphx::instruction_ref add_pointwise(migraphx::program& p,

Callers 3

add_pointwiseFunction · 0.70
add_pointwise_concatFunction · 0.50
TEST_CASEFunction · 0.50

Calls 11

set_bypassMethod · 0.80
add_parameterMethod · 0.80
transformFunction · 0.50
to_stringFunction · 0.50
create_moduleMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
typeMethod · 0.45
get_shapeMethod · 0.45
add_returnMethod · 0.45

Tested by

no test coverage detected