Skip to content

Commit

Permalink
[webgpu] Add kernel type to profile info
Browse files Browse the repository at this point in the history
  • Loading branch information
qjia7 committed Dec 20, 2024
1 parent 4aca8f3 commit c12d70c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions onnxruntime/core/providers/webgpu/webgpu_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion onnxruntime/core/providers/webgpu/webgpu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c12d70c

Please sign in to comment.