Skip to content

Commit

Permalink
even more printfs
Browse files Browse the repository at this point in the history
  • Loading branch information
prathikr committed Dec 18, 2024
1 parent fc38f82 commit 2dd0fce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions onnxruntime/core/providers/webgpu/tensor/slice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,16 @@ Status Slice::ComputeInternal(ComputeContext& context) const {
}
std::cout << "val after handling negative: " << val << std::endl;

std::cout << "steps raw i: " << steps_raw[i] << std::endl;
if (steps_raw[i] < 0) {
std::cout << "steps raw < 0" << std::endl;
std::cout << "axes raw i: " << axes_raw[i] << std::endl;
std::cout << "input shape axes raw i: " << input_shape[axes_raw[i]] << std::endl;
val = std::max(static_cast<int64_t>(0), std::min(val, static_cast<int64_t>(input_shape[axes_raw[i]] - 1)));
} else {
std::cout << "steps raw >= 0" << std::endl;
std::cout << "axes raw i: " << axes_raw[i] << std::endl;
std::cout << "input shape axes raw i: " << input_shape[axes_raw[i]] << std::endl;
val = std::max(static_cast<int64_t>(0), std::min(val, static_cast<int64_t>(input_shape[axes_raw[i]])));
}
std::cout << "val after clamping: " << val << std::endl;
Expand Down

0 comments on commit 2dd0fce

Please sign in to comment.