Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions onnxruntime/core/providers/webgpu/math/cum_sum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@
int64_t input_rank = input_shape.NumDimensions();

const auto* axis_tensor = context.Input(1);
const auto* axis_data = axis_tensor->Data<int>();
int64_t axis = static_cast<int64_t>(axis_data[0]);
int64_t axis;
if (axis_tensor->DataType() == DataTypeImpl::GetType<int64_t>()) {
axis = axis_tensor->Data<int64_t>()[0];
} else {
axis = static_cast<int64_t>(axis_tensor->Data<int>()[0]);
};

Check warning on line 74 in onnxruntime/core/providers/webgpu/math/cum_sum.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 You don't need a ; after a } [readability/braces] [4] Raw Output: onnxruntime/core/providers/webgpu/math/cum_sum.cc:74: You don't need a ; after a } [readability/braces] [4]

ORT_ENFORCE(-input_rank <= axis && axis < input_rank, "Axes attribute must be within range -input_rank <= axis < input_rank.");
// Handle negative axis
Expand Down Expand Up @@ -95,4 +99,4 @@
}

} // namespace webgpu
} // namespace onnxruntime
} // namespace onnxruntime
Loading