pytorch/c10
Nikita Shulga 495049860b [BE][Metal] Fix signed unsigned comparison warning (#146549)
I wish I knew how to extract Metal warnings during JIT compilation but https://developer.apple.com/documentation/metal/mtldevice/makelibrary(source:options:)?changes=_7&language=objc is a lie as `error:` stays `nil` unless shader compilation fails. But when it does following warnings are thrown
```
program_source:666:26: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
  for (auto idx = 1; idx < size; ++idx) {
                     ~~~ ^ ~~~~
program_source:677:26: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
  for (auto idx = 1; idx < size; ++idx) {
                     ~~~ ^ ~~~~
program_source:688:26: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
  for (auto idx = 1; idx < size; ++idx) {
                     ~~~ ^ ~~~~
program_source:699:26: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
  for (auto idx = 1; idx < size; ++idx) {
                     ~~~ ^ ~~~~
program_source:710:26: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
  for (auto idx = 1; idx < size; ++idx) {
                     ~~~ ^ ~~~~
program_source:723:26: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
  for (auto idx = 1; idx < size; ++idx) {

```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/146549
Approved by: https://github.com/dcci
2025-02-06 00:40:17 +00:00
..
benchmark Set RUNPATH so installed tests can find the required shared libraries (#136627) 2024-10-25 09:38:08 +00:00
core Use std::string_view (#145906) 2025-01-30 03:14:27 +00:00
cuda use copy2d in h2d/d2h copy when possible (#146256) 2025-02-03 23:07:54 +00:00
hip
macros [ROCm][Windows] Fix export macros (#144098) 2025-01-04 17:12:46 +00:00
metal [BE][Metal] Fix signed unsigned comparison warning (#146549) 2025-02-06 00:40:17 +00:00
mobile [2/N] Fix extra warnings brought by clang-tidy-17 (#137459) 2024-10-08 19:05:02 +00:00
test Fix cppcoreguidelines-init-variables ignorance (#141795) 2025-01-28 17:11:37 +00:00
util initialize device when pinning memory on this device, short circuit i… (#145752) 2025-01-30 21:37:29 +00:00
xpu Filter out iGPU if dGPU is found on XPU (#144378) 2025-01-29 15:53:16 +00:00
BUCK.oss
BUILD.bazel
build.bzl
CMakeLists.txt
ovrsource_defs.bzl