Skip to content

Commit

Permalink
add noop kernel runlist latency test (#221)
Browse files Browse the repository at this point in the history
Signed-off-by: Min Ma <min.ma@amd.com>
  • Loading branch information
mamin506 authored Aug 23, 2024
1 parent 27457c9 commit 5228267
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/shim_test/io_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,18 @@ TEST_io_latency(device::id_type id, std::shared_ptr<device> sdev, arg_type& arg)
io_test(id, sdev.get(), 1000, 1, 1);
}

void
TEST_io_runlist_latency(device::id_type id, std::shared_ptr<device> sdev, arg_type& arg)
{
io_test_parameter_init(IO_TEST_LATENCY_PERF, static_cast<unsigned int>(arg[0]));
io_test(id, sdev.get(), 32000, 1, 1);
io_test(id, sdev.get(), 16000, 1, 2);
io_test(id, sdev.get(), 8000, 1, 4);
io_test(id, sdev.get(), 4000, 1, 8);
io_test(id, sdev.get(), 2000, 1, 16);
io_test(id, sdev.get(), 1333, 1, 24);
}

void
TEST_io_throughput(device::id_type id, std::shared_ptr<device> sdev, arg_type& arg)
{
Expand Down
4 changes: 4 additions & 0 deletions test/shim_test/shim_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ using arg_type = const std::vector<uint64_t>;
void TEST_export_import_bo(device::id_type, std::shared_ptr<device>, arg_type&);
void TEST_io(device::id_type, std::shared_ptr<device>, arg_type&);
void TEST_io_latency(device::id_type, std::shared_ptr<device>, arg_type&);
void TEST_io_runlist_latency(device::id_type, std::shared_ptr<device>, arg_type&);
void TEST_io_throughput(device::id_type, std::shared_ptr<device>, arg_type&);
void TEST_noop_io_with_dup_bo(device::id_type, std::shared_ptr<device>, arg_type&);
void TEST_shim_umq_vadd(device::id_type, std::shared_ptr<device>, arg_type&);
Expand Down Expand Up @@ -563,6 +564,9 @@ std::vector<test_case> test_list {
test_case{ "io test no op with duplicated BOs",
TEST_POSITIVE, dev_filter_is_aie2, TEST_noop_io_with_dup_bo, {}
},
test_case{ "io test no-op kernel latency listed command",
TEST_POSITIVE, dev_filter_is_aie2, TEST_io_runlist_latency, { IO_TEST_NOOP_RUN }
},
};

} // namespace
Expand Down

0 comments on commit 5228267

Please sign in to comment.