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

Function is_compiled_cpu_module

test/multi_target/multitarget_test.cpp:94–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94static bool is_compiled_cpu_module(const migraphx::module& m)
95{
96 return std::all_of(m.begin(), m.end(), [](const auto& ins) {
97 auto ins_name = ins.name();
98 // sub is not lowered on CPU backend due to vectorization on non-aligned memory.
99 if(not migraphx::starts_with(ins_name, "@") and ins_name != "sub")
100 {
101 if(not migraphx::starts_with(ins_name, "cpu::") and
102 not migraphx::starts_with(ins_name, "dnnl::") and
103 not migraphx::starts_with(ins_name, "check_context") and not has_target_attr(ins) and
104 not migraphx::contains(nonprefixed_ops(), ins_name))
105 {
106 return false;
107 }
108 }
109 return true;
110 });
111}
112
113static bool is_compiled_ref_module(const migraphx::module& m)
114{

Callers 1

check_compiled_programFunction · 0.85

Calls 8

starts_withFunction · 0.85
has_target_attrFunction · 0.85
containsFunction · 0.85
nonprefixed_opsFunction · 0.85
all_ofFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected