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

Method compute_shape

src/targets/gpu/code_object_op.cpp:35–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33MIGRAPHX_REGISTER_OP(code_object_op);
34
35shape code_object_op::compute_shape(std::vector<shape> inputs) const
36{
37 std::transform(inputs.begin(), inputs.end(), inputs.begin(), [](const shape& s) {
38 return s.normalize_standard();
39 });
40 auto einputs = expected_inputs;
41 std::transform(einputs.begin(), einputs.end(), einputs.begin(), [](const shape& s) {
42 return s.normalize_standard();
43 });
44 if(not migraphx::equal(flatten(einputs), flatten(inputs), &shape::is_compatible))
45 MIGRAPHX_THROW("Input shapes have changed: [" + to_string_range(einputs) + "] -> [" +
46 to_string_range(inputs) + "]");
47 return output;
48}
49
50static bool needs_flatten(const std::vector<argument>& args)
51{

Callers

nothing calls this directly

Calls 7

to_string_rangeFunction · 0.85
normalize_standardMethod · 0.80
transformFunction · 0.50
equalFunction · 0.50
flattenClass · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected