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

Function TEST_CASE

test/perf_report.cpp:30–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#include "test.hpp"
29
30TEST_CASE(perf_report)
31{
32 migraphx::program p;
33 auto* mm = p.get_main_module();
34
35 std::stringstream ss;
36 auto one = mm->add_literal(1);
37 auto two = mm->add_literal(2);
38 mm->add_instruction(migraphx::make_op("add"), one, two);
39 p.compile(migraphx::make_target("ref"));
40 p.perf_report(ss, 2, {});
41
42 std::string output = ss.str();
43 EXPECT(migraphx::contains(output, "Summary:"));
44 EXPECT(migraphx::contains(output, "Batch size:"));
45 EXPECT(migraphx::contains(output, "Rate:"));
46 EXPECT(migraphx::contains(output, "Total time:"));
47 EXPECT(migraphx::contains(output, "Total instructions time:"));
48 EXPECT(migraphx::contains(output, "Overhead time:"));
49 EXPECT(migraphx::contains(output, "Overhead:"));
50 EXPECT(not migraphx::contains(output, "fast"));
51}
52
53int main(int argc, const char* argv[]) { test::run(argc, argv); }

Callers

nothing calls this directly

Calls 9

make_targetFunction · 0.85
containsFunction · 0.85
get_main_moduleMethod · 0.80
perf_reportMethod · 0.80
make_opFunction · 0.50
add_literalMethod · 0.45
add_instructionMethod · 0.45
compileMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected