Skip to content

Error building from the 2.3 branch #2038

@Krytern

Description

@Krytern

I am trying to build from source using this branch https://github.com/ROCm/pytorch/tree/release/2.3

Here's the error I am getting

FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/ir/ir.cpp.o 
/usr/bin/c++ -DAT_PER_OPERATOR_HEADERS -DBUILD_ONEDNN_GRAPH -DCAFFE2_BUILD_MAIN_LIB -DCPUINFO_SUPPORTED_PLATFORM=1 -DFLASHATTENTION_DISABLE_ALIBI -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_C10D_GLOO -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/home/ubuntu/pytorch/build/aten/src -I/home/ubuntu/pytorch/aten/src -I/home/ubuntu/pytorch/build -I/home/ubuntu/pytorch -I/home/ubuntu/pytorch/cmake/../third_party/benchmark/include -I/home/ubuntu/pytorch/third_party/onnx -I/home/ubuntu/pytorch/build/third_party/onnx -I/home/ubuntu/pytorch/third_party/foxi -I/home/ubuntu/pytorch/build/third_party/foxi -I/home/ubuntu/pytorch/torch/csrc/api -I/home/ubuntu/pytorch/torch/csrc/api/include -I/home/ubuntu/pytorch/caffe2/aten/src/TH -I/home/ubuntu/pytorch/build/caffe2/aten/src/TH -I/home/ubuntu/pytorch/build/caffe2/aten/src -I/home/ubuntu/pytorch/build/caffe2/../aten/src -I/home/ubuntu/pytorch/torch/csrc -I/home/ubuntu/pytorch/third_party/miniz-2.1.0 -I/home/ubuntu/pytorch/third_party/kineto/libkineto/include -I/home/ubuntu/pytorch/third_party/kineto/libkineto/src -I/home/ubuntu/pytorch/aten/src/ATen/.. -I/home/ubuntu/pytorch/third_party/FXdiv/include -I/home/ubuntu/pytorch/c10/.. -I/home/ubuntu/pytorch/third_party/pthreadpool/include -I/home/ubuntu/pytorch/third_party/cpuinfo/include -I/home/ubuntu/pytorch/third_party/QNNPACK/include -I/home/ubuntu/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/home/ubuntu/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/home/ubuntu/pytorch/third_party/QNNPACK/deps/clog/include -I/home/ubuntu/pytorch/third_party/NNPACK/include -I/home/ubuntu/pytorch/third_party/fbgemm/include -I/home/ubuntu/pytorch/third_party/fbgemm -I/home/ubuntu/pytorch/third_party/fbgemm/third_party/asmjit/src -I/home/ubuntu/pytorch/third_party/ittapi/src/ittnotify -I/home/ubuntu/pytorch/third_party/FP16/include -I/home/ubuntu/pytorch/third_party/tensorpipe -I/home/ubuntu/pytorch/build/third_party/tensorpipe -I/home/ubuntu/pytorch/third_party/tensorpipe/third_party/libnop/include -I/home/ubuntu/pytorch/third_party/fmt/include -I/home/ubuntu/pytorch/build/third_party/ideep/mkl-dnn/include -I/home/ubuntu/pytorch/third_party/ideep/mkl-dnn/src/../include -I/home/ubuntu/pytorch/third_party/flatbuffers/include -isystem /home/ubuntu/pytorch/build/third_party/gloo -isystem /home/ubuntu/pytorch/cmake/../third_party/gloo -isystem /home/ubuntu/pytorch/cmake/../third_party/tensorpipe/third_party/libuv/include -isystem /home/ubuntu/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /home/ubuntu/pytorch/cmake/../third_party/googletest/googletest/include -isystem /home/ubuntu/pytorch/third_party/protobuf/src -isystem /home/ubuntu/miniconda3/envs/test/include -isystem /home/ubuntu/pytorch/third_party/gemmlowp -isystem /home/ubuntu/pytorch/third_party/neon2sse -isystem /home/ubuntu/pytorch/third_party/XNNPACK/include -isystem /home/ubuntu/pytorch/third_party/ittapi/include -isystem /home/ubuntu/pytorch/cmake/../third_party/eigen -isystem /home/ubuntu/pytorch/third_party/ideep/mkl-dnn/include/oneapi/dnnl -isystem /home/ubuntu/pytorch/third_party/ideep/include -isystem /home/ubuntu/pytorch/build/include -D_GLIBCXX_USE_CXX11_ABI=1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=range-loop-construct -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -std=gnu++17 -fPIC -DMKL_HAS_SBGEMM -DMKL_HAS_SHGEMM -DTORCH_USE_LIBUV -DCAFFE2_USE_GLOO -Wall -Wextra -Wdeprecated -Wno-unused-parameter -Wno-unused-function -Wno-missing-field-initializers -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-strict-overflow -Wno-strict-aliasing -Wno-maybe-uninitialized -fvisibility=hidden -O2 -pthread -DASMJIT_STATIC -fopenmp -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/ir/ir.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/ir/ir.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/ir/ir.cpp.o -c /home/ubuntu/pytorch/torch/csrc/jit/ir/ir.cpp
/home/ubuntu/pytorch/torch/csrc/jit/ir/ir.cpp: In member function ‘bool torch::jit::Node::hasSideEffects() const’:
/home/ubuntu/pytorch/torch/csrc/jit/ir/ir.cpp:1188:16: error: ‘set_stream’ is not a member of ‘torch::jit::cuda’; did you mean ‘c10::cuda::set_stream’?
 1188 |     case cuda::set_stream:
      |                ^~~~~~~~~~
In file included from /home/ubuntu/pytorch/torch/csrc/jit/ir/ir.h:18,
                 from /home/ubuntu/pytorch/torch/csrc/jit/ir/ir.cpp:1:
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:228:11: note: ‘c10::cuda::set_stream’ declared here
  228 |   _(cuda, set_stream)                \
      |           ^~~~~~~~~~
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:354:35: note: in definition of macro ‘DEFINE_SYMBOL’
  354 |   namespace ns { constexpr Symbol s(static_cast<unique_t>(_keys::ns##_##s)); }
      |                                   ^
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:355:1: note: in expansion of macro ‘FORALL_NS_SYMBOLS’
  355 | FORALL_NS_SYMBOLS(DEFINE_SYMBOL)
      | ^~~~~~~~~~~~~~~~~
/home/ubuntu/pytorch/torch/csrc/jit/ir/ir.cpp:1189:16: error: ‘_set_device’ is not a member of ‘torch::jit::cuda’; did you mean ‘c10::cuda::_set_device’?
 1189 |     case cuda::_set_device:
      |                ^~~~~~~~~~~
In file included from /home/ubuntu/pytorch/torch/csrc/jit/ir/ir.h:18,
                 from /home/ubuntu/pytorch/torch/csrc/jit/ir/ir.cpp:1:
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:227:11: note: ‘c10::cuda::_set_device’ declared here
  227 |   _(cuda, _set_device)               \
      |           ^~~~~~~~~~~
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:354:35: note: in definition of macro ‘DEFINE_SYMBOL’
  354 |   namespace ns { constexpr Symbol s(static_cast<unique_t>(_keys::ns##_##s)); }
      |                                   ^
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:355:1: note: in expansion of macro ‘FORALL_NS_SYMBOLS’
  355 | FORALL_NS_SYMBOLS(DEFINE_SYMBOL)
      | ^~~~~~~~~~~~~~~~~
/home/ubuntu/pytorch/torch/csrc/jit/ir/ir.cpp:1190:16: error: ‘_current_device’ is not a member of ‘torch::jit::cuda’; did you mean ‘c10::cuda::_current_device’?
 1190 |     case cuda::_current_device:
      |                ^~~~~~~~~~~~~~~
In file included from /home/ubuntu/pytorch/torch/csrc/jit/ir/ir.h:18,
                 from /home/ubuntu/pytorch/torch/csrc/jit/ir/ir.cpp:1:
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:229:11: note: ‘c10::cuda::_current_device’ declared here
  229 |   _(cuda, _current_device)           \
      |           ^~~~~~~~~~~~~~~
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:354:35: note: in definition of macro ‘DEFINE_SYMBOL’
  354 |   namespace ns { constexpr Symbol s(static_cast<unique_t>(_keys::ns##_##s)); }
      |                                   ^
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:355:1: note: in expansion of macro ‘FORALL_NS_SYMBOLS’
  355 | FORALL_NS_SYMBOLS(DEFINE_SYMBOL)
      | ^~~~~~~~~~~~~~~~~
/home/ubuntu/pytorch/torch/csrc/jit/ir/ir.cpp:1191:16: error: ‘synchronize’ is not a member of ‘torch::jit::cuda’; did you mean ‘c10::cuda::synchronize’?
 1191 |     case cuda::synchronize:
      |                ^~~~~~~~~~~
In file included from /home/ubuntu/pytorch/torch/csrc/jit/ir/ir.h:18,
                 from /home/ubuntu/pytorch/torch/csrc/jit/ir/ir.cpp:1:
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:230:11: note: ‘c10::cuda::synchronize’ declared here
  230 |   _(cuda, synchronize)               \
      |           ^~~~~~~~~~~
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:354:35: note: in definition of macro ‘DEFINE_SYMBOL’
  354 |   namespace ns { constexpr Symbol s(static_cast<unique_t>(_keys::ns##_##s)); }
      |                                   ^
/home/ubuntu/pytorch/aten/src/ATen/core/interned_strings.h:355:1: note: in expansion of macro ‘FORALL_NS_SYMBOLS’
  355 | FORALL_NS_SYMBOLS(DEFINE_SYMBOL)
      | ^~~~~~~~~~~~~~~~~
[7204/8144] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/mobile/nnc/aot_compiler.cpp.o
ninja: build stopped: subcommand failed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions