mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-11 17:48:34 +00:00
[webgpu] Add kernel type to profile info (#23167)
### Description This PR is convenient to do post processing for the generated json file when profiling is enabled. Kernel type can be used to aggregate the same type kernels' overall time.
This commit is contained in:
parent
5c2e60c5af
commit
4247153bb2
2 changed files with 3 additions and 1 deletions
|
|
@ -239,6 +239,7 @@ Status WebGpuContext::Run(ComputeContext& context, const ProgramBase& program) {
|
|||
|
||||
if (is_profiling_) {
|
||||
PendingKernelInfo pending_kernel_info(context.KernelContext().GetNodeName(),
|
||||
context.KernelContext().GetOpType(),
|
||||
program.Name(),
|
||||
key,
|
||||
inputs,
|
||||
|
|
|
|||
|
|
@ -147,11 +147,12 @@ class WebGpuContext final {
|
|||
|
||||
struct PendingKernelInfo {
|
||||
PendingKernelInfo(std::string_view kernel_name,
|
||||
std::string_view kernel_type,
|
||||
std::string_view program_name,
|
||||
std::string_view cache_key,
|
||||
const std::vector<ProgramInput>& inputs,
|
||||
const std::vector<ProgramOutput>& outputs)
|
||||
: name{absl::StrJoin({kernel_name, program_name}, "_")}, cache_key{cache_key}, inputs{inputs}, outputs{outputs} {}
|
||||
: name{absl::StrJoin({kernel_name, kernel_type, program_name}, "&")}, cache_key{cache_key}, inputs{inputs}, outputs{outputs} {}
|
||||
|
||||
PendingKernelInfo(PendingKernelInfo&&) = default;
|
||||
PendingKernelInfo& operator=(PendingKernelInfo&&) = default;
|
||||
|
|
|
|||
Loading…
Reference in a new issue