Skip to content

Commit

Permalink
more debug printfs
Browse files Browse the repository at this point in the history
  • Loading branch information
prathikr committed Dec 18, 2024
1 parent 3f5deb4 commit fc38f82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions onnxruntime/core/providers/webgpu/tensor/slice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,18 @@ Status Slice::ComputeInternal(ComputeContext& context) const {
std::vector<uint32_t> starts;
for (unsigned int i = 0; i < starts_raw.size(); i++) {
int64_t val = starts_raw[i];
std::cout << "val: " << val << std::endl;
if (val < 0) {
val += input_shape[axes_raw[i]];
}
std::cout << "val after handling negative: " << val << std::endl;

if (steps_raw[i] < 0) {
val = std::max(static_cast<int64_t>(0), std::min(val, static_cast<int64_t>(input_shape[axes_raw[i]] - 1)));
} else {
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;
starts.push_back(static_cast<uint32_t>(val));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ steps:
- ${{ if eq(parameters.MacosArch, 'x86_64') }}:
- script: |
python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --test ${{ parameters.AdditionalBuildFlags }} --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release
python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --test ${{ parameters.AdditionalBuildFlags }} --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --use_binskim_compliant_compile_flags --build_shared_lib --config Release
displayName: 'Running Tests'
- task: ShellScript@2
Expand Down

0 comments on commit fc38f82

Please sign in to comment.