Open albanD opened 1 year ago
Running locally lintrunner --force-color --all-files (like is done in the CI job fails with the following:
lintrunner --force-color --all-files
Full env:
$ python torch/utils/collect_env.py Collecting environment information... PyTorch version: 2.2.0a0+gitd1ae5ef Is debug build: False CUDA used to build PyTorch: Could not collect ROCM used to build PyTorch: N/A OS: Fedora release 37 (Thirty Seven) (x86_64) GCC version: (GCC) 12.3.1 20230508 (Red Hat 12.3.1-1) Clang version: Could not collect CMake version: version 3.27.1 Libc version: glibc-2.36 Python version: 3.11.4+ (heads/3.11:f207b346d4, Jun 11 2023, 14:33:13) [GCC 12.3.1 20230508 (Red Hat 12.3.1-1)] (64-bit runtime) Python platform: Linux-6.5.6-100.fc37.x86_64-x86_64-with-glibc2.36 Is CUDA available: False CUDA runtime version: 12.2.91 CUDA_MODULE_LOADING set to: N/A GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3070 Ti Laptop GPU Nvidia driver version: 535.129.03 cuDNN version: Could not collect HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: False CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 20 On-line CPU(s) list: 0-19 Vendor ID: GenuineIntel Model name: 12th Gen Intel(R) Core(TM) i7-12700H CPU family: 6 Model: 154 Thread(s) per core: 2 Core(s) per socket: 14 Socket(s): 1 Stepping: 3 CPU(s) scaling MHz: 51% CPU max MHz: 4700.0000 CPU min MHz: 400.0000 BogoMIPS: 5376.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities Virtualization: VT-x L1d cache: 544 KiB (14 instances) L1i cache: 704 KiB (14 instances) L2 cache: 11.5 MiB (8 instances) L3 cache: 24 MiB (1 instance) NUMA node(s): 1 NUMA node0 CPU(s): 0-19 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Versions of relevant libraries: [pip3] flake8==6.0.0 [pip3] flake8-bugbear==23.3.23 [pip3] flake8-comprehensions==3.12.0 [pip3] flake8-executable==2.1.3 [pip3] flake8-logging-format==0.9.0 [pip3] flake8-pyi==23.3.1 [pip3] flake8-simplify==0.19.3 [pip3] mypy==1.6.0 [pip3] mypy-extensions==1.0.0 [pip3] numpy==1.26.0 [pip3] optree==0.10.0 [pip3] pytorch-sphinx-theme==0.0.24 [pip3] torch==2.2.0a0+gitd1ae5ef [pip3] torchaudio==2.0.0a0+1717eda [pip3] torchdata==0.6.0a0+e9ee0f5 [pip3] torchvision==0.15.0a0+7dc5e5b [pip3] torchviz==0.0.2 [conda] Could not collect
Some of the C++ failures seems to stem from C++ header difference between CI vs local
Running locally
lintrunner --force-color --all-files
(like is done in the CI job fails with the following:Full env:
Full error
``` >>> Lint for aten/src/ATen/core/IListRef_test.cpp: Error (CLANGTIDY) [clang-diagnostic-error] 'gtest/gtest.h' file not found 4 |#include8 |#include
Error (CLANGTIDY) [cppcoreguidelines-init-variables,-warnings-as-errors]
variable 'ints' is not initialized
10 |using namespace ::testing;
11 |
12 |TEST(accumulateTest, vector_test) {
>>> 13 | std::vector ints = {1, 2, 3, 4, 5};
14 |
15 | EXPECT_EQ(c10::sum_integers(ints), 1 + 2 + 3 + 4 + 5);
16 | EXPECT_EQ(c10::multiply_integers(ints), 1 * 2 * 3 * 4 * 5);
Error (CLANGTIDY) [cppcoreguidelines-init-variables,-warnings-as-errors]
variable 'ints' is not initialized
30 |}
31 |
32 |TEST(accumulateTest, list_test) {
>>> 33 | std::list ints = {1, 2, 3, 4, 5};
34 |
35 | EXPECT_EQ(c10::sum_integers(ints), 1 + 2 + 3 + 4 + 5);
36 | EXPECT_EQ(c10::multiply_integers(ints), 1 * 2 * 3 * 4 * 5);
Error (CLANGTIDY) [cppcoreguidelines-init-variables,-warnings-as-errors]
variable 'ints' is not initialized
46 |}
47 |
48 |TEST(accumulateTest, base_cases) {
>>> 49 | std::vector ints = {};
50 |
51 | EXPECT_EQ(c10::sum_integers(ints), 0);
52 | EXPECT_EQ(c10::multiply_integers(ints), 1);
Error (CLANGTIDY) [cppcoreguidelines-init-variables,-warnings-as-errors]
variable 'ints' is not initialized
53 |}
54 |
55 |TEST(accumulateTest, errors) {
>>> 56 | std::vector ints = {1, 2, 3, 4, 5};
57 |
58 |#ifndef NDEBUG
59 | EXPECT_THROW(c10::numelements_from_dim(-1, ints), c10::Error);
>>> Lint for c10/test/util/bfloat16_test.cpp:
Error (CLANGTIDY) [clang-diagnostic-error]
'gtest/gtest.h' file not found
3 |#include
4 |#include
5 |// clang-format on
>>> 6 |#include
7 |
8 |namespace {
9 |float float_from_bytes(uint32_t sign, uint32_t exponent, uint32_t fraction) {
>>> Lint for c10/test/util/bit_cast_test.cpp:
Error (CLANGTIDY) [clang-diagnostic-error]
'gmock/gmock.h' file not found
1 |#include
2 |
>>> 3 |#include
4 |#include
5 |
6 |#include
>>> Lint for c10/test/util/complex_math_test.cpp:
Error (CLANGTIDY) [clang-diagnostic-error]
'gtest/gtest.h' file not found
>>> 1 |#include
2 |#define C10_DEFINE_TEST(a, b) TEST(a, b)
3 |#define C10_ASSERT_NEAR(a, b, tol) ASSERT_NEAR(a, b, tol)
4 |#include
>>> Lint for c10/test/util/complex_test_common.h:
Error (CLANGTIDY) [clang-diagnostic-error]
'gtest/gtest.h' file not found
1 |#include
2 |#include
3 |#include
>>> 4 |#include
5 |#include
6 |#include
7 |#include
>>> Lint for c10/test/util/either_test.cpp:
Error (CLANGTIDY) [clang-diagnostic-error]
'gmock/gmock.h' file not found
3 |
4 |#include
5 |#include
>>> 6 |#include
7 |#include
8 |#include
9 |#include
>>> Lint for c10/test/util/exception_test.cpp:
Error (CLANGTIDY) [clang-diagnostic-error]
'gtest/gtest.h' file not found
1 |#include
>>> 2 |#include
3 |#include
4 |
5 |using c10::Error;
>>> Lint for c10/test/util/flags_test.cpp:
Error (CLANGTIDY) [clang-diagnostic-error]
'gtest/gtest.h' file not found
>>> 1 |#include
2 |
3 |#include
4 |
>>> Lint for c10/test/util/intrusive_ptr_test.cpp:
Error (CLANGTIDY) [clang-diagnostic-error]
'gtest/gtest.h' file not found
1 |#include
2 |
>>> 3 |#include
4 |#include