CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
#pragma once
|
|
#include <rocprofiler-sdk/experimental/thread-trace/trace_decoder.h>
|
|
#include <nlohmann/json.hpp>
|
|
#include <vector>
|
|
#include "outputfile.hpp"
|
|
|
|
namespace rocprofiler
|
|
{
|
|
namespace att_wrapper
|
|
{
|
|
inline void
|
|
write_other_simd_json(
|
|
const std::vector<rocprofiler_thread_trace_decoder_inst_other_simd_t>& records,
|
|
const Fspath& filepath,
|
|
int64_t begin_time,
|
|
int64_t end_time)
|
|
{
|
|
nlohmann::ordered_json out;
|
|
out["type"] = "OTHER_SIMD_INSTRUCTIONS";
|
|
out["begin_time"] = begin_time;
|
|
out["end_time"] = end_time;
|
|
out["wgp"] = records.front().wgp;
|
|
out["instructions_schema"] = {"time", "duration", "category"};
|
|
|
|
nlohmann::json::array_t events;
|
|
events.reserve(records.size());
|
|
|
|
for(const auto& in : records)
|
|
{
|
|
events.push_back({
|
|
in.time,
|
|
static_cast<int>(in.cycles),
|
|
static_cast<int>(in.category),
|
|
});
|
|
}
|
|
|
|
out["instructions_count"] = events.size();
|
|
out["instructions"] = std::move(events);
|
|
OutputFile(filepath.string()) << out;
|
|
}
|
|
|
|
} // namespace att_wrapper
|
|
} // namespace rocprofiler
|