Skip to content

pytorch-1.11.0 compile error: set_stream’ is not a member of ‘torch::jit::cuda’ #18

@waptaff

Description

@waptaff

Trying to compile pytorch-1.11.0 I get the errors below.

My USE flags are: fbgemm ffmpeg gloo mpi nnpack numpy observers opencv openmp python qnnpack rocm tools -asan -atlas -caffe2 -cuda -doc -eigen -gflags -glog -leveldb -lmdb -mkl -mkldnn -namedtensor -numa -openblas -opencl -redis -static -tbb -test -zeromq

Trying to compile with rocm for an AMD card, with gcc-11.3.0p4 on an amd64 system.

Do you see anything obvious that'd explain the errors?

Thanks,

/mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/torch/csrc/jit/ir/ir.cpp: In member function ‘bool torch::jit::Node::hasSideEffects() const’:                                                                                                                                
/mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/torch/csrc/jit/ir/ir.cpp:1194:16: error: ‘set_stream’ is not a member of ‘torch::jit::cuda’; did you mean ‘c10::cuda::set_stream’?                                                                                           
 1194 |     case cuda::set_stream:                                                                                                                
      |                ^~~~~~~~~~                                                                                                                 
In file included from /mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/torch/csrc/jit/ir/ir.h:18,                           
                 from /mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/torch/csrc/jit/ir/ir.cpp:1:                          
/mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/aten/src/ATen/core/interned_strings.h:208:11: note: ‘c10::cuda::set_stream’ declared here                                                                                                                                    
  208 |   _(cuda, set_stream)                \                                                                                                    
      |           ^~~~~~~~~~                                                                                                                      
/mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/aten/src/ATen/core/interned_strings.h:321:35: note: in definition of macro ‘DEFINE_SYMBOL’                                                                                                                                   
  321 |   namespace ns { constexpr Symbol s(static_cast<unique_t>(_keys::ns##_##s)); }                                                            
      |                                   ^                                                                                                       
/mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/aten/src/ATen/core/interned_strings.h:322:1: note: in expansion of macro ‘FORALL_NS_SYMBOLS’                                                                                                                                 
  322 | FORALL_NS_SYMBOLS(DEFINE_SYMBOL)                                                                                                          
      | ^~~~~~~~~~~~~~~~~                                                                                                                         
/mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/torch/csrc/jit/ir/ir.cpp:1195:16: error: ‘_set_device’ is not a member of ‘torch::jit::cuda’; did you mean ‘c10::cuda::_set_device’?                                                                                         
 1195 |     case cuda::_set_device:                                                                                                               
      |                ^~~~~~~~~~~                                                                                                                
In file included from /mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/torch/csrc/jit/ir/ir.h:18,                           
                 from /mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/torch/csrc/jit/ir/ir.cpp:1:                          
/mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/aten/src/ATen/core/interned_strings.h:207:11: note: ‘c10::cuda::_set_device’ declared here                                                                                                                                   
  207 |   _(cuda, _set_device)               \                                                                                                    
      |           ^~~~~~~~~~~                                                                                                                     
/mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/aten/src/ATen/core/interned_strings.h:321:35: note: in definition of macro ‘DEFINE_SYMBOL’                                                                                                                                   
  321 |   namespace ns { constexpr Symbol s(static_cast<unique_t>(_keys::ns##_##s)); }                                                            
      |                                   ^                                                                                                       
/mnt/t/tmp-portage/portage/sci-libs/pytorch-1.11.0/work/pytorch-1.11.0/aten/src/ATen/core/interned_strings.h:322:1: note: in expansion of macro ‘FORALL_NS_SYMBOLS’
  322 | FORALL_NS_SYMBOLS(DEFINE_SYMBOL)
      | ^~~~~~~~~~~~~~~~~                                                                         
…

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions