Skip to content

Fix printing tensor bug - regression introduced in #6444 - #6595

Merged
ssheorey merged 2 commits into
isl-org:mainfrom
saurabheights:HotFix/RegressionInPrintingCudaTensor
Jan 19, 2024
Merged

ssheorey merged 2 commits into
isl-org:mainfrom
saurabheights:HotFix/RegressionInPrintingCudaTensor

Conversation

@saurabheights

Copy link
Copy Markdown
Contributor

Type

Motivation and Context

My apologies for adding the regression in printing of cuda tensor. I recently got the cuda build working, thus detected this regression late. I have tested the bug.

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

The earlier PR #6444 added a bug where suffix for cuda tensor is printed when it is moved to CPU and then again when it is in GPU.

o3d.core.Tensor.eye(n=4, dtype=o3d.core.Dtype.Float64, device=o3d.core.Device('cuda:0'))
[[1 0 0 0],
 [0 1 0 0],
 [0 0 1 0],
 [0 0 0 1]]
Tensor[shape={4, 4}, stride={4, 1}, Float64, CPU:0, 0x561c38e195d0]
Tensor[shape={4, 4}, stride={4, 1}, Float64, CUDA:0, 0x302000000]

This is fixed with test below.
Screenshot from 2024-01-11 12-55-02

Again, my apologies. This being added to v0.18 just makes it worse.

@saurabheights saurabheights changed the title Fix regression introduced in #6444 Fix printing tensor bug - regression introduced in #6444 Jan 11, 2024
@ssheorey

ssheorey commented Jan 19, 2024 •

Copy link
Copy Markdown
Member

Thanks @saurabheights !
CI failure is unrelated to PR.

@ssheorey
ssheorey merged commit ee65b6c into isl-org:main Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants