sgemm_wg: Output CPU data to binary

This commit is contained in:
Hansung Kim
2024-04-14 21:25:14 -07:00
parent 4e9855dc33
commit 6cbfbfb856
2 changed files with 8 additions and 1 deletions

View File

@@ -258,7 +258,6 @@ void vx_spawn_tasks_cluster(int num_tasks, vx_spawn_tasks_cb callback, void *arg
// threads, handle this in the last wave amongst other full warps.
if (rem_threads_in_last_warp != 0 && core_id_in_cluster == 0) {
// adjust offset
// FIXME: consider cluster_id here
// FIXME: use rem_threads_in_last_warp_this_core
wspawn_args.offset += (num_tasks_this_cluster - rem_threads_in_last_warp);

View File

@@ -119,6 +119,14 @@ int run_test(const kernel_arg_t& kernel_arg,
file.write(reinterpret_cast<char *>(staging_buf.data()), buf_size);
file.close();
std::ofstream ref_file("reference.c.bin", std::ios::binary | std::ios::out);
if (!ref_file) {
std::cerr << "error: failed to open reference.c.bin for writing\n";
exit(EXIT_FAILURE);
}
ref_file.write(reinterpret_cast<char *>(ref_data.data()), buf_size);
ref_file.close();
// verify result
std::cout << "verify result" << std::endl;
{