Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Werror=nonnull in dataloader.cpp (part of tests) #77646

Open
bulvara opened this issue May 17, 2022 · 5 comments
Open

Werror=nonnull in dataloader.cpp (part of tests) #77646

bulvara opened this issue May 17, 2022 · 5 comments
Labels
module: dataloader Related to torch.utils.data.DataLoader and Sampler triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@bulvara
Copy link

bulvara commented May 17, 2022

馃悰 Describe the bug

FAILED: test_api/CMakeFiles/test_api.dir/dataloader.cpp.o

/usr/bin/ccache /usr/bin/c++ -DGFLAGS_IS_A_DLL=0 -DGLOG_CUSTOM_PREFIX_SUPPORT -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -I./pytorch/build/aten/src -I./pytorch/aten/src -I./pytorch/build -I./pytorch -I./pytorch/cmake/../third_party/benchmark/include -I./pytorch/third_party/onnx -I./pytorch/build/third_party/onnx -I./pytorch/third_party/foxi -I./pytorch/build/third_party/foxi -I./pytorch/build/caffe2/../aten/src -I./pytorch/torch/csrc/api -I./pytorch/torch/csrc/api/include -I./pytorch/c10/.. -isystem ./pytorch/cmake/../third_party/googletest/googlemock/include -isystem ./pytorch/cmake/../third_party/googletest/googletest/include -isystem ./pytorch/third_party/gemmlowp -isystem ./pytorch/third_party/neon2sse -isystem ./pytorch/third_party/XNNPACK/include -isystem /usr/include/opencv4 -isystem ./pytorch/cmake/../third_party/eigen -isystem ./pytorch/third_party/ideep/include -isystem ./pytorch/third_party/ideep/mkl-dnn/include -isystem ./pytorch/third_party/googletest/googletest/include -isystem ./pytorch/third_party/googletest/googletest -march=native -mtune=native -O3 -pipe -fno-plt -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-array-bounds -Wno-uninitialized -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -fPIE -DTH_HAVE_THREAD -Wno-unused-variable -Wno-maybe-uninitialized -Wno-unused-but-set-parameter -std=gnu++14 -MD -MT test_api/CMakeFiles/test_api.dir/dataloader.cpp.o -MF test_api/CMakeFiles/test_api.dir/dataloader.cpp.o.d -o test_api/CMakeFiles/test_api.dir/dataloader.cpp.o -c ./pytorch/test/cpp/api/dataloader.cpp
In Datei, eingebunden von /usr/include/c++/12.1.0/memory:63,
                 von ./pytorch/third_party/googletest/googletest/include/gtest/gtest.h:57,
                 von ./pytorch/test/cpp/api/dataloader.cpp:1:
In statischer Elementfunktion 禄static _Tp* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(const _Tp*, const _Tp*, _Tp*) [with _Tp = long unsigned int; bool _IsMove = false]芦,
    eingef眉gt von 禄_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = const long unsigned int*; _OI = long unsigned int*]芦 bei /usr/include/c++/12.1.0/bits/stl_algobase.h:495:30,
    eingef眉gt von 禄_OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = const long unsigned int*; _OI = long unsigned int*]芦 bei /usr/include/c++/12.1.0/bits/stl_algobase.h:522:42,
    eingef眉gt von 禄_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = __gnu_cxx::__normal_iterator<const long unsigned int*, vector<long unsigned int> >; _OI = __gnu_cxx::__normal_iterator<long unsigned int*, vector<long unsigned int> >]芦 bei /usr/include/c++/12.1.0/bits/stl_algobase.h:529:31,
    eingef眉gt von 禄_OI std::copy(_II, _II, _OI) [with _II = __gnu_cxx::__normal_iterator<const long unsigned int*, vector<long unsigned int> >; _OI = __gnu_cxx::__normal_iterator<long unsigned int*, vector<long unsigned int> >]芦 bei /usr/include/c++/12.1.0/bits/stl_algobase.h:620:7,
    eingef眉gt von 禄std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = long unsigned int; _Alloc = std::allocator<long unsigned int>]芦 bei /usr/include/c++/12.1.0/bits/vector.tcc:244:21:
/usr/include/c++/12.1.0/bits/stl_algobase.h:431:30: Fehler: Argument 1 ist null, aber nichtnull wird erwartet [-Werror=nonnull]
  431 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12.1.0/bits/stl_algobase.h:431:30: Anmerkung: in einem Aufruf der eingebauten Funktion 禄void* __builtin_memmove(void*, const void*, long unsigned int)芦

Versions

PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Arch Linux (x86_64)
GCC version: (GCC) 12.1.0
Clang version: 13.0.1
CMake version: version 3.23.1
Libc version: glibc-2.35

Python version: 3.10.4 (main, May 14 2022, 05:21:19) [GCC 12.1.0] (64-bit runtime)
Python platform: Linux-5.17.8-1-x86_64-with-glibc2.35
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

GPU: Radeon RX 460: No interest in CUDA or ROCm

cc @ssnl @VitalyFedyunin @ejguan @NivekT

@kgizdov
Copy link

kgizdov commented May 18, 2022

workaround: export BUILD_TEST=OFF

@anjali411 anjali411 added module: dataloader Related to torch.utils.data.DataLoader and Sampler triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels May 18, 2022
@bulvara
Copy link
Author

bulvara commented May 20, 2022

workaround: export BUILD_TEST=OFF

@kgizdov Thank you very much, this is enough to get rid my problem!

PS: I don't want to canvass, but have you ever seen tensorflow/tensorflow#56171 (TF MLIR error)?

@jgong5
Copy link
Collaborator

jgong5 commented Jul 18, 2023

I guess this can be addressed by this PR: #99468

@unholdmx
Copy link

unholdmx commented Feb 29, 2024

workaround: export BUILD_TEST=OFF

@kgizdov @bulvara I have the same problem, could you specify how to use this work-around? Where do I find this option?


Found the option

BUILD_TEST=0
#     disables the test build

in the setup.py file but it is not changing anything for me, in fact it seems to be ignored (also BUILD_TEST=1, BUILD_TEST=True, BUILD_TEST=False) does not work.

@t-vi
Copy link
Collaborator

t-vi commented Mar 13, 2024

If you want to narrow it down:
For me, it is specifically the TEST(DataLoaderTest, CustomPreprocessPolicy) (the last test) that causes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: dataloader Related to torch.utils.data.DataLoader and Sampler triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

6 participants