Skip to content

Conversation

@dhruvbird
Copy link
Contributor

@dhruvbird dhruvbird commented Mar 10, 2022

Since this class was added, it's missing a unit test. @dbort first noticed it, so adding one in this commit.

Differential Revision: [D34800969](https://our.internmc.facebook.com/intern/diff/D34800969/)

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 10, 2022

CI Flow Status

⚛️ CI Flow

Ruleset - Version: v1
Ruleset - File: https://github.com/pytorch/pytorch/blob/4121fccff3fc6111ac5de43010744af7c273cfa2/.github/generated-ciflow-ruleset.json
PR ciflow labels: ciflow/default
Add ciflow labels to this PR to trigger more builds:

Workflows Labels (bold enabled) Status
Triggered Workflows
linux-binary-conda ciflow/binaries, ciflow/binaries_conda, ciflow/default ✅ triggered
linux-binary-libtorch-cxx11-abi ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
linux-binary-libtorch-pre-cxx11 ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
linux-binary-manywheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
linux-bionic-py3.7-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/noarch, ciflow/trunk ✅ triggered
linux-bionic-rocm4.5-py3.7 ciflow/all, ciflow/default, ciflow/linux, ciflow/rocm, ciflow/trunk ✅ triggered
linux-docs ciflow/all, ciflow/cpu, ciflow/default, ciflow/docs, ciflow/linux, ciflow/trunk ✅ triggered
linux-vulkan-bionic-py3.7-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk, ciflow/vulkan ✅ triggered
linux-xenial-cuda11.3-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-cuda11.3-py3.7-gcc7-bazel-test ciflow/all, ciflow/bazel, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3-clang5-mobile-build ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile, ciflow/trunk ✅ triggered
linux-xenial-py3-clang5-mobile-custom-build-static ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile, ciflow/trunk ✅ triggered
linux-xenial-py3.7-clang7-asan ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/sanitizers, ciflow/trunk ✅ triggered
linux-xenial-py3.7-clang7-onnx ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/onnx, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc5.4-mobile-lightweight-dispatch-build ciflow/all, ciflow/cpu, ciflow/default, ciflow/libtorch, ciflow/linux, ciflow/mobile, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc7 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc7-no-ops ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
macos-arm64-binary-conda ciflow/binaries, ciflow/binaries_conda, ciflow/default ✅ triggered
macos-arm64-binary-wheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
macos-binary-conda ciflow/binaries, ciflow/binaries_conda, ciflow/default ✅ triggered
macos-binary-libtorch-cxx11-abi ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
macos-binary-libtorch-pre-cxx11 ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
macos-binary-wheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single ciflow/all, ciflow/android, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single-full-jit ciflow/all, ciflow/android, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
win-vs2019-cpu-py3 ciflow/all, ciflow/cpu, ciflow/default, ciflow/trunk, ciflow/win ✅ triggered
win-vs2019-cuda11.3-py3 ciflow/all, ciflow/cuda, ciflow/default, ciflow/trunk, ciflow/win ✅ triggered
windows-binary-libtorch-cxx11-abi ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
windows-binary-libtorch-pre-cxx11 ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
windows-binary-wheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
Skipped Workflows
caffe2-linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped
docker-builds ciflow/all, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64 ciflow/all, ciflow/ios, ciflow/macos, ciflow/scheduled 🚫 skipped
ios-12-5-1-arm64-coreml ciflow/all, ciflow/ios, ciflow/macos, ciflow/scheduled 🚫 skipped
ios-12-5-1-arm64-custom-ops ciflow/all, ciflow/ios, ciflow/macos, ciflow/scheduled 🚫 skipped
ios-12-5-1-arm64-metal ciflow/all, ciflow/ios, ciflow/macos, ciflow/scheduled 🚫 skipped
ios-12-5-1-x86-64 ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-x86-64-coreml ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
libtorch-linux-xenial-cuda10.2-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/trunk 🚫 skipped
libtorch-linux-xenial-cuda11.3-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/trunk 🚫 skipped
linux-bionic-cuda10.2-py3.9-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/slow, ciflow/trunk 🚫 skipped
linux-docs-push ciflow/all, ciflow/cpu, ciflow/linux, ciflow/scheduled 🚫 skipped
linux-xenial-cuda11.3-py3.7-gcc7-no-ops ciflow/all, ciflow/cuda, ciflow/linux, ciflow/trunk 🚫 skipped
macos-10-15-py3-arm64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
macos-10-15-py3-lite-interpreter-x86-64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
macos-11-py3-x86-64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
parallelnative-linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped
periodic-libtorch-linux-bionic-cuda11.5-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-linux-bionic-cuda11.5-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-linux-xenial-cuda10.2-py3-gcc7-slow-gradcheck ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled, ciflow/slow, ciflow/slow-gradcheck 🚫 skipped
periodic-linux-xenial-cuda11.3-py3.7-gcc7-debug ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-win-vs2019-cuda11.5-py3 ciflow/all, ciflow/cuda, ciflow/scheduled, ciflow/win 🚫 skipped
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-build ciflow/all, ciflow/android, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped
pytorch-xla-linux-bionic-py3.7-clang8 ciflow/all, ciflow/cpu, ciflow/linux, ciflow/trunk, ciflow/xla 🚫 skipped

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Mar 10, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 4538391 (more details on the Dr. CI page):


  • 3/3 failures introduced in this PR

🕵️ 2 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See GitHub Actions build win-vs2019-cuda11.3-py3 / build (1/2)

Step: "Build" (full log | diagnosis details | 🔁 rerun)

2022-03-11T07:21:53.8920347Z C:\actions-runner\...zed_test.cpp(34): error C2100: illegal indirection
2022-03-11T07:21:53.8902081Z C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include\initializer_list(57): note: see declaration of 'std::begin'
2022-03-11T07:21:53.8903861Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C2672: 'end': no matching overloaded function found
2022-03-11T07:21:53.8905982Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C2893: Failed to specialize function template 'unknown-type std::end(_Container &)'
2022-03-11T07:21:53.8907975Z C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include\xutility(2179): note: see declaration of 'std::end'
2022-03-11T07:21:53.8909561Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): note: With the following template arguments:
2022-03-11T07:21:53.8911112Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): note: '_Container=int'
2022-03-11T07:21:53.8913114Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C2784: 'const _Elem *std::end(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'
2022-03-11T07:21:53.8915213Z C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include\initializer_list(63): note: see declaration of 'std::end'
2022-03-11T07:21:53.8916962Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C3536: '<begin>$L1': cannot be used before it is initialized
2022-03-11T07:21:53.8918715Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C3536: '<end>$L1': cannot be used before it is initialized
2022-03-11T07:21:53.8920347Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C2100: illegal indirection
2022-03-11T07:21:53.8921592Z Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29337 for x64
2022-03-11T07:21:53.8922495Z Copyright (C) Microsoft Corporation.  All rights reserved.
2022-03-11T07:21:53.8923071Z 
2022-03-11T07:21:53.9870041Z [4425/6220] cmd.exe /C "cd . && C:\Jenkins\Miniconda3\Library\bin\cmake.exe -E vs_link_dll --intdir=c10\CMakeFiles\c10.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe  c10\CMakeFiles\c10.dir\core\Allocator.cpp.obj c10\CMakeFiles\c10.dir\core\AutogradState.cpp.obj c10\CMakeFiles\c10.dir\core\CPUAllocator.cpp.obj c10\CMakeFiles\c10.dir\core\CopyBytes.cpp.obj c10\CMakeFiles\c10.dir\core\DefaultDtype.cpp.obj c10\CMakeFiles\c10.dir\core\Device.cpp.obj c10\CMakeFiles\c10.dir\core\DeviceType.cpp.obj c10\CMakeFiles\c10.dir\core\DispatchKey.cpp.obj c10\CMakeFiles\c10.dir\core\DispatchKeySet.cpp.obj c10\CMakeFiles\c10.dir\core\GeneratorImpl.cpp.obj c10\CMakeFiles\c10.dir\core\GradMode.cpp.obj c10\CMakeFiles\c10.dir\core\InferenceMode.cpp.obj c10\CMakeFiles\c10.dir\core\Scalar.cpp.obj c10\CMakeFiles\c10.dir\core\Storage.cpp.obj c10\CMakeFiles\c10.dir\core\StorageImpl.cpp.obj c10\CMakeFiles\c10.dir\core\Stream.cpp.obj c10\CMakeFiles\c10.dir\core\TensorImpl.cpp.obj c10\CMakeFiles\c10.dir\core\TensorOptions.cpp.obj c10\CMakeFiles\c10.dir\core\UndefinedTensorImpl.cpp.obj c10\CMakeFiles\c10.dir\core\impl\DeviceGuardImplInterface.cpp.obj c10\CMakeFiles\c10.dir\core\impl\LocalDispatchKeySet.cpp.obj c10\CMakeFiles\c10.dir\core\impl\SizesAndStrides.cpp.obj c10\CMakeFiles\c10.dir\core\impl\alloc_cpu.cpp.obj c10\CMakeFiles\c10.dir\core\thread_pool.cpp.obj c10\CMakeFiles\c10.dir\mobile\CPUCachingAllocator.cpp.obj c10\CMakeFiles\c10.dir\mobile\CPUProfilingAllocator.cpp.obj c10\CMakeFiles\c10.dir\util\Array.cpp.obj c10\CMakeFiles\c10.dir\util\Backtrace.cpp.obj c10\CMakeFiles\c10.dir\util\C++17.cpp.obj c10\CMakeFiles\c10.dir\util\DeadlockDetection.cpp.obj c10\CMakeFiles\c10.dir\util\Exception.cpp.obj c10\CMakeFiles\c10.dir\util\Half.cpp.obj c10\CMakeFiles\c10.dir\util\LeftRight.cpp.obj c10\CMakeFiles\c10.dir\util\Logging.cpp.obj c10\CMakeFiles\c10.dir\util\MathConstants.cpp.obj c10\CMakeFiles\c10.dir\util\Metaprogramming.cpp.obj c10\CMakeFiles\c10.dir\util\Optional.cpp.obj c10\CMakeFiles\c10.dir\util\SmallVector.cpp.obj c10\CMakeFiles\c10.dir\util\StringUtil.cpp.obj c10\CMakeFiles\c10.dir\util\ThreadLocalDebugInfo.cpp.obj c10\CMakeFiles\c10.dir\util\TypeCast.cpp.obj c10\CMakeFiles\c10.dir\util\TypeList.cpp.obj c10\CMakeFiles\c10.dir\util\TypeTraits.cpp.obj c10\CMakeFiles\c10.dir\util\Type_demangle.cpp.obj c10\CMakeFiles\c10.dir\util\Type_no_demangle.cpp.obj c10\CMakeFiles\c10.dir\util\Unicode.cpp.obj c10\CMakeFiles\c10.dir\util\UniqueVoidPtr.cpp.obj c10\CMakeFiles\c10.dir\util\complex_math.cpp.obj c10\CMakeFiles\c10.dir\util\flags_use_gflags.cpp.obj c10\CMakeFiles\c10.dir\util\flags_use_no_gflags.cpp.obj c10\CMakeFiles\c10.dir\util\int128.cpp.obj c10\CMakeFiles\c10.dir\util\intrusive_ptr.cpp.obj c10\CMakeFiles\c10.dir\util\numa.cpp.obj c10\CMakeFiles\c10.dir\util\signal_handler.cpp.obj c10\CMakeFiles\c10.dir\util\thread_name.cpp.obj c10\CMakeFiles\c10.dir\util\typeid.cpp.obj  /out:bin\c10.dll /implib:lib\c10.lib /pdb:bin\c10.pdb /dll /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /INCREMENTAL:NO  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
2022-03-11T07:21:54.1061110Z [4426/6220] C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\bin\sccache-cl.exe   /TP -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE=1 -D_OPENMP_NOFORCE_MANIFEST -IC:\actions-runner\_work\pytorch\pytorch\build\aten\src -IC:\actions-runner\_work\pytorch\pytorch\aten\src -IC:\actions-runner\_work\pytorch\pytorch\build -IC:\actions-runner\_work\pytorch\pytorch -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\benchmark\include -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\cudnn_frontend\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\onnx -IC:\actions-runner\_work\pytorch\pytorch\build\third_party\onnx -IC:\actions-runner\_work\pytorch\pytorch\third_party\foxi -IC:\actions-runner\_work\pytorch\pytorch\build\third_party\foxi -IC:\actions-runner\_work\pytorch\pytorch\c10\.. -IC:\actions-runner\_work\pytorch\pytorch\build\third_party\gloo -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\gloo -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\googletest\googlemock\include -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\googletest\googletest\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\protobuf\src -IC:\actions-runner\_work\pytorch\pytorch\build\win_tmp\mkl\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\XNNPACK\include -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\eigen -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\actions-runner\_work\pytorch\pytorch\third_party\ideep\mkl-dnn\third_party\oneDNN\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\ideep\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\googletest\googlemock\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\googletest\googlemock -IC:\actions-runner\_work\pytorch\pytorch\third_party\googletest\googletest\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\googletest\googletest /DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -IC:/actions-runner/_work/pytorch/pytorch/build/win_tmp/mkl/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO /MD /O2 /Ob2 /DNDEBUG /w /bigobj -DNDEBUG -DCAFFE2_USE_GLOO -DTH_HAVE_THREAD -std:c++14 /showIncludes /Foc10\test\CMakeFiles\c10_accumulate_test.dir\util\accumulate_test.cpp.obj /Fdc10\test\CMakeFiles\c10_accumulate_test.dir\ /FS -c C:\actions-runner\_work\pytorch\pytorch\c10\test\util\accumulate_test.cpp
2022-03-11T07:21:54.1069324Z Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29337 for x64
2022-03-11T07:21:54.1069894Z Copyright (C) Microsoft Corporation.  All rights reserved.
2022-03-11T07:21:54.1070293Z 
2022-03-11T07:21:54.1706902Z [4427/6220] C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\bin\sccache-cl.exe   /TP -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE=1 -D_OPENMP_NOFORCE_MANIFEST -IC:\actions-runner\_work\pytorch\pytorch\build\aten\src -IC:\actions-runner\_work\pytorch\pytorch\aten\src -IC:\actions-runner\_work\pytorch\pytorch\build -IC:\actions-runner\_work\pytorch\pytorch -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\benchmark\include -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\cudnn_frontend\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\onnx -IC:\actions-runner\_work\pytorch\pytorch\build\third_party\onnx -IC:\actions-runner\_work\pytorch\pytorch\third_party\foxi -IC:\actions-runner\_work\pytorch\pytorch\build\third_party\foxi -IC:\actions-runner\_work\pytorch\pytorch\c10\.. -IC:\actions-runner\_work\pytorch\pytorch\build\third_party\gloo -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\gloo -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\googletest\googlemock\include -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\googletest\googletest\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\protobuf\src -IC:\actions-runner\_work\pytorch\pytorch\build\win_tmp\mkl\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\XNNPACK\include -IC:\actions-runner\_work\pytorch\pytorch\cmake\..\third_party\eigen -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\actions-runner\_work\pytorch\pytorch\third_party\ideep\mkl-dnn\third_party\oneDNN\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\ideep\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\googletest\googlemock\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\googletest\googlemock -IC:\actions-runner\_work\pytorch\pytorch\third_party\googletest\googletest\include -IC:\actions-runner\_work\pytorch\pytorch\third_party\googletest\googletest /DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -IC:/actions-runner/_work/pytorch/pytorch/build/win_tmp/mkl/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO /MD /O2 /Ob2 /DNDEBUG /w /bigobj -DNDEBUG -DCAFFE2_USE_GLOO -DTH_HAVE_THREAD -std:c++14 /showIncludes /Foc10\test\CMakeFiles\c10_bfloat16_test.dir\util\bfloat16_test.cpp.obj /Fdc10\test\CMakeFiles\c10_bfloat16_test.dir\ /FS -c C:\actions-runner\_work\pytorch\pytorch\c10\test\util\bfloat16_test.cpp
2022-03-11T07:21:54.1715222Z Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29337 for x64

See GitHub Actions build win-vs2019-cpu-py3 / build (2/2)

Step: "Build" (full log | diagnosis details | 🔁 rerun)

2022-03-11T07:20:51.3050751Z C:\actions-runner\...zed_test.cpp(34): error C2100: illegal indirection
2022-03-11T07:20:51.3039374Z C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include\initializer_list(57): note: see declaration of 'std::begin'
2022-03-11T07:20:51.3040550Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C2672: 'end': no matching overloaded function found
2022-03-11T07:20:51.3042030Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C2893: Failed to specialize function template 'unknown-type std::end(_Container &)'
2022-03-11T07:20:51.3043129Z C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include\xutility(2179): note: see declaration of 'std::end'
2022-03-11T07:20:51.3044104Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): note: With the following template arguments:
2022-03-11T07:20:51.3045017Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): note: '_Container=int'
2022-03-11T07:20:51.3046206Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C2784: 'const _Elem *std::end(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'
2022-03-11T07:20:51.3047451Z C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include\initializer_list(63): note: see declaration of 'std::end'
2022-03-11T07:20:51.3048462Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C3536: '<begin>$L1': cannot be used before it is initialized
2022-03-11T07:20:51.3049498Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C3536: '<end>$L1': cannot be used before it is initialized
2022-03-11T07:20:51.3050751Z C:\actions-runner\_work\pytorch\pytorch\c10\test\util\Synchronized_test.cpp(34): error C2100: illegal indirection
2022-03-11T07:20:51.3051697Z Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29337 for x64
2022-03-11T07:20:51.3052271Z Copyright (C) Microsoft Corporation.  All rights reserved.
2022-03-11T07:20:51.3052616Z 
2022-03-11T07:20:51.7627741Z [4422/5803] cmd.exe /C "cd . && C:\Jenkins\Miniconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=c10\test\CMakeFiles\c10_InlineDeviceGuard_test.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe  c10\test\CMakeFiles\c10_InlineDeviceGuard_test.dir\core\impl\InlineDeviceGuard_test.cpp.obj  /out:bin\c10_InlineDeviceGuard_test.exe /implib:lib\c10_InlineDeviceGuard_test.lib /pdb:bin\c10_InlineDeviceGuard_test.pdb /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /INCREMENTAL:NO /subsystem:console  lib\c10.lib  lib\gmock.lib  lib\gtest.lib  lib\gtest_main.lib  lib\gtest.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
2022-03-11T07:20:51.7633607Z [4423/5803] cmd.exe /C "cd . && C:\Jenkins\Miniconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=c10\test\CMakeFiles\c10_DispatchKeySet_test.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe  c10\test\CMakeFiles\c10_DispatchKeySet_test.dir\core\DispatchKeySet_test.cpp.obj  /out:bin\c10_DispatchKeySet_test.exe /implib:lib\c10_DispatchKeySet_test.lib /pdb:bin\c10_DispatchKeySet_test.pdb /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /INCREMENTAL:NO /subsystem:console  lib\c10.lib  lib\gmock.lib  lib\gtest.lib  lib\gtest_main.lib  lib\gtest.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
2022-03-11T07:20:51.8347116Z [4424/5803] cmd.exe /C "cd . && C:\Jenkins\Miniconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=c10\test\CMakeFiles\c10_Device_test.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe  c10\test\CMakeFiles\c10_Device_test.dir\core\Device_test.cpp.obj  /out:bin\c10_Device_test.exe /implib:lib\c10_Device_test.lib /pdb:bin\c10_Device_test.pdb /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /INCREMENTAL:NO /subsystem:console  lib\c10.lib  lib\gmock.lib  lib\gtest.lib  lib\gtest_main.lib  lib\gtest.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
2022-03-11T07:20:51.8362056Z [4425/5803] cmd.exe /C "cd . && C:\Jenkins\Miniconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=c10\test\CMakeFiles\c10_InlineStreamGuard_test.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe  c10\test\CMakeFiles\c10_InlineStreamGuard_test.dir\core\impl\InlineStreamGuard_test.cpp.obj  /out:bin\c10_InlineStreamGuard_test.exe /implib:lib\c10_InlineStreamGuard_test.lib /pdb:bin\c10_InlineStreamGuard_test.pdb /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /INCREMENTAL:NO /subsystem:console  lib\c10.lib  lib\gmock.lib  lib\gtest.lib  lib\gtest_main.lib  lib\gtest.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
2022-03-11T07:20:51.9280855Z [4426/5803] cmd.exe /C "cd . && C:\Jenkins\Miniconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=c10\test\CMakeFiles\c10_StreamGuard_test.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe  c10\test\CMakeFiles\c10_StreamGuard_test.dir\core\StreamGuard_test.cpp.obj  /out:bin\c10_StreamGuard_test.exe /implib:lib\c10_StreamGuard_test.lib /pdb:bin\c10_StreamGuard_test.pdb /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /INCREMENTAL:NO /subsystem:console  lib\c10.lib  lib\gmock.lib  lib\gtest.lib  lib\gtest_main.lib  lib\gtest.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
2022-03-11T07:20:51.9296210Z [4427/5803] cmd.exe /C "cd . && C:\Jenkins\Miniconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=c10\test\CMakeFiles\c10_DeviceGuard_test.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe  c10\test\CMakeFiles\c10_DeviceGuard_test.dir\core\DeviceGuard_test.cpp.obj  /out:bin\c10_DeviceGuard_test.exe /implib:lib\c10_DeviceGuard_test.lib /pdb:bin\c10_DeviceGuard_test.pdb /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /INCREMENTAL:NO /subsystem:console  lib\c10.lib  lib\gmock.lib  lib\gtest.lib  lib\gtest_main.lib  lib\gtest.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
2022-03-11T07:20:53.4786363Z [4428/5803] cmd.exe /C "cd . && C:\Jenkins\Miniconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=c10\test\CMakeFiles\c10_CompileTimeFunctionPointer_test.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe  c10\test\CMakeFiles\c10_CompileTimeFunctionPointer_test.dir\core\CompileTimeFunctionPointer_test.cpp.obj  /out:bin\c10_CompileTimeFunctionPointer_test.exe /implib:lib\c10_CompileTimeFunctionPointer_test.lib /pdb:bin\c10_CompileTimeFunctionPointer_test.pdb /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /INCREMENTAL:NO /subsystem:console  lib\c10.lib  lib\gmock.lib  lib\gtest.lib  lib\gtest_main.lib  lib\gtest.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."

1 failure not recognized by patterns:

Job Step Action
GitHub Actions Lint / clang-format Run clang-format 🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

Copy link
Contributor

@dbort dbort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for adding this! Looks great.

Please take a look at the clang-tidy and clang-format warnings/errors on internal CI.

Comment on lines 1 to 2
#include "c10/util/Synchronized.h"
#include <c10/util/Synchronized.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate includes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks VSCode!

Since this class was added, it's missing a unit test. dbort first noticed it, so adding one in this commit.

Differential Revision: [D34800969](https://our.internmc.facebook.com/intern/diff/D34800969/)

[ghstack-poisoned]
dhruvbird added a commit that referenced this pull request Mar 11, 2022
Pull Request resolved: #74062

Since this class was added, it's missing a unit test. @dbort first noticed it, so adding one in this commit.
ghstack-source-id: 151114689

Differential Revision: [D34800969](https://our.internmc.facebook.com/intern/diff/D34800969/)
Since this class was added, it's missing a unit test. dbort first noticed it, so adding one in this commit.

Differential Revision: [D34800969](https://our.internmc.facebook.com/intern/diff/D34800969/)

[ghstack-poisoned]
dhruvbird added a commit that referenced this pull request Mar 11, 2022
Pull Request resolved: #74062

Since this class was added, it's missing a unit test. @dbort first noticed it, so adding one in this commit.
ghstack-source-id: 151122696

Differential Revision: [D34800969](https://our.internmc.facebook.com/intern/diff/D34800969/)
facebook-github-bot pushed a commit that referenced this pull request Mar 11, 2022
Summary:
Pull Request resolved: #74062

Since this class was added, it's missing a unit test. dbort first noticed it, so adding one in this commit.
ghstack-source-id: 151122696

Test Plan: `buck test //xplat/caffe2/c10:c10_test`

Reviewed By: dbort

Differential Revision: D34800969

fbshipit-source-id: e665ab0df2faf505536bf27bdf29fcd3e70fe699
@github-actions
Copy link
Contributor

Hey @dhruvbird.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@malfet
Copy link
Contributor

malfet commented Mar 11, 2022

Why this change was landed when it clearly broke Windows builds and clang-format?

@facebook-github-bot
Copy link
Contributor

This pull request has been reverted by 4adfe06. To re-land this change, please open another pull request, assignthe same reviewers, fix the CI failures that caused the revert and make sure that the failing CI runs on the PR by applying the proper ciflow label (e.g., ciflow/trunk).

@facebook-github-bot facebook-github-bot deleted the gh/dhruvbird/91/head branch March 14, 2022 14:17
@facebook-github-bot
Copy link
Contributor

This pull request has been reverted by 4adfe06. To re-land this change, please open another pull request, assignthe same reviewers, fix the CI failures that caused the revert and make sure that the failing CI runs on the PR by applying the proper ciflow label (e.g., ciflow/trunk).

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.

5 participants