Skip to content

[Easy] Fix "comparison of unsigned integer with zero" warning #109882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

peterbell10
Copy link
Collaborator

@peterbell10 peterbell10 commented Sep 22, 2023

Stack from ghstack (oldest at bottom):

This fixes a warning that pops up in nvcc:

[1495/1767] Building CUDA object caffe2/CMak...dir/__/aten/src/ATen/native/cuda/Unique.cu.o
/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h(1283): warning #186-D: pointless comparison of unsigned integer with zero
      while (false) if (!(uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags)) { ::c10::detail::torchInternalAssertFail( __func__, "/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h", static_cast<uint32_t>(1283), "uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags" " INTERNAL ASSERT FAILED at " "\"/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h\"" ":" "1283" ", please report a bug to PyTorch. ", c10::str("unexpected tag ", static_cast<int>(tag))); }

This fixes a warning that pops up in nvcc:

```
[1495/1767] Building CUDA object caffe2/CMak...dir/__/aten/src/ATen/native/cuda/Unique.cu.o
/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h(1283): warning #186-D: pointless comparison of unsigned integer with zero
      while (false) if (!(uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags)) { ::c10::detail::torchInternalAssertFail( __func__, "/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h", static_cast<uint32_t>(1283), "uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags" " INTERNAL ASSERT FAILED at " "\"/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h\"" ":" "1283" ", please report a bug to PyTorch. ", c10::str("unexpected tag ", static_cast<int>(tag))); }
```

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 22, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/109882

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit ebd9d47 with merge base ebc7039 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

peterbell10 added a commit that referenced this pull request Sep 22, 2023
This fixes a warning that pops up in nvcc:

```
[1495/1767] Building CUDA object caffe2/CMak...dir/__/aten/src/ATen/native/cuda/Unique.cu.o
/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h(1283): warning #186-D: pointless comparison of unsigned integer with zero
      while (false) if (!(uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags)) { ::c10::detail::torchInternalAssertFail( __func__, "/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h", static_cast<uint32_t>(1283), "uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags" " INTERNAL ASSERT FAILED at " "\"/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h\"" ":" "1283" ", please report a bug to PyTorch. ", c10::str("unexpected tag ", static_cast<int>(tag))); }
```

ghstack-source-id: c9821c5
Pull Request resolved: #109882
…ing"

This fixes a warning that pops up in nvcc:

```
[1495/1767] Building CUDA object caffe2/CMak...dir/__/aten/src/ATen/native/cuda/Unique.cu.o
/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h(1283): warning #186-D: pointless comparison of unsigned integer with zero
      while (false) if (!(uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags)) { ::c10::detail::torchInternalAssertFail( __func__, "/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h", static_cast<uint32_t>(1283), "uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags" " INTERNAL ASSERT FAILED at " "\"/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h\"" ":" "1283" ", please report a bug to PyTorch. ", c10::str("unexpected tag ", static_cast<int>(tag))); }
```

[ghstack-poisoned]
…ing"

This fixes a warning that pops up in nvcc:

```
[1495/1767] Building CUDA object caffe2/CMak...dir/__/aten/src/ATen/native/cuda/Unique.cu.o
/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h(1283): warning #186-D: pointless comparison of unsigned integer with zero
      while (false) if (!(uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags)) { ::c10::detail::torchInternalAssertFail( __func__, "/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h", static_cast<uint32_t>(1283), "uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags" " INTERNAL ASSERT FAILED at " "\"/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h\"" ":" "1283" ", please report a bug to PyTorch. ", c10::str("unexpected tag ", static_cast<int>(tag))); }
```

[ghstack-poisoned]
…ing"

This fixes a warning that pops up in nvcc:

```
[1495/1767] Building CUDA object caffe2/CMak...dir/__/aten/src/ATen/native/cuda/Unique.cu.o
/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h(1283): warning #186-D: pointless comparison of unsigned integer with zero
      while (false) if (!(uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags)) { ::c10::detail::torchInternalAssertFail( __func__, "/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h", static_cast<uint32_t>(1283), "uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags" " INTERNAL ASSERT FAILED at " "\"/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h\"" ":" "1283" ", please report a bug to PyTorch. ", c10::str("unexpected tag ", static_cast<int>(tag))); }
```

[ghstack-poisoned]
peterbell10 added a commit that referenced this pull request Sep 22, 2023
This fixes a warning that pops up in nvcc:

```
[1495/1767] Building CUDA object caffe2/CMak...dir/__/aten/src/ATen/native/cuda/Unique.cu.o
/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h(1283): warning #186-D: pointless comparison of unsigned integer with zero
      while (false) if (!(uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags)) { ::c10::detail::torchInternalAssertFail( __func__, "/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h", static_cast<uint32_t>(1283), "uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags" " INTERNAL ASSERT FAILED at " "\"/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h\"" ":" "1283" ", please report a bug to PyTorch. ", c10::str("unexpected tag ", static_cast<int>(tag))); }
```

ghstack-source-id: 152b002
Pull Request resolved: #109882
…ing"

This fixes a warning that pops up in nvcc:

```
[1495/1767] Building CUDA object caffe2/CMak...dir/__/aten/src/ATen/native/cuda/Unique.cu.o
/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h(1283): warning #186-D: pointless comparison of unsigned integer with zero
      while (false) if (!(uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags)) { ::c10::detail::torchInternalAssertFail( __func__, "/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h", static_cast<uint32_t>(1283), "uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags" " INTERNAL ASSERT FAILED at " "\"/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h\"" ":" "1283" ", please report a bug to PyTorch. ", c10::str("unexpected tag ", static_cast<int>(tag))); }
```

[ghstack-poisoned]
…ing"

This fixes a warning that pops up in nvcc:

```
[1495/1767] Building CUDA object caffe2/CMak...dir/__/aten/src/ATen/native/cuda/Unique.cu.o
/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h(1283): warning #186-D: pointless comparison of unsigned integer with zero
      while (false) if (!(uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags)) { ::c10::detail::torchInternalAssertFail( __func__, "/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h", static_cast<uint32_t>(1283), "uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags" " INTERNAL ASSERT FAILED at " "\"/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h\"" ":" "1283" ", please report a bug to PyTorch. ", c10::str("unexpected tag ", static_cast<int>(tag))); }
```

[ghstack-poisoned]
peterbell10 added a commit that referenced this pull request Sep 22, 2023
This fixes a warning that pops up in nvcc:

```
[1495/1767] Building CUDA object caffe2/CMak...dir/__/aten/src/ATen/native/cuda/Unique.cu.o
/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h(1283): warning #186-D: pointless comparison of unsigned integer with zero
      while (false) if (!(uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags)) { ::c10::detail::torchInternalAssertFail( __func__, "/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h", static_cast<uint32_t>(1283), "uint32_t(tag) >= 0 && uint32_t(tag) < kNumTags" " INTERNAL ASSERT FAILED at " "\"/home/pbell/git/pytorch/aten/src/ATen/core/ivalue.h\"" ":" "1283" ", please report a bug to PyTorch. ", c10::str("unexpected tag ", static_cast<int>(tag))); }
```

ghstack-source-id: 8eacedd
Pull Request resolved: #109882
@peterbell10 peterbell10 closed this Oct 3, 2023
@facebook-github-bot facebook-github-bot deleted the gh/peterbell10/620/head branch November 3, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants