Repository: pytorch
Issue: [vulkan]compiling VulkanOpContext.cpp with some errors
Labels: module: build,triaged,module: vulkan

### 🐛 Describe the bug

Compiling the newest version pytorch with backend vulkan,there is some errors with VulkanOpContext
[340/1314] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/vulkan/ops/VulkanOpContext.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/vulkan/ops/VulkanOpContext.cpp.o 
/usr/bin/c++ -DAT_PER_OPERATOR_HEADERS -DBUILD_ONEDNN_GRAPH -DCPUINFO_SUPPORTED_PLATFORM=1 -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 -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/sim/**/20220714/pytorch/build/aten/src -I/home/sim/**/20220714/pytorch/aten/src -I/home/sim/**/20220714/pytorch/build -I/home/sim/**/20220714/pytorch -I/home/sim/**/20220714/pytorch/cmake/../third_party/benchmark/include -I/home/sim/**/20220714/pytorch/third_party/onnx -I/home/sim/**/20220714/pytorch/build/third_party/onnx -I/home/sim/**/20220714/pytorch/third_party/foxi -I/home/sim/**/20220714/pytorch/build/third_party/foxi -I/home/sim/**/20220714/pytorch/torch/csrc/api -I/home/sim/**/20220714/pytorch/torch/csrc/api/include -I/home/sim/**/20220714/pytorch/caffe2/aten/src/TH -I/home/sim/**/20220714/pytorch/build/caffe2/aten/src/TH -I/home/sim/**/20220714/pytorch/build/caffe2/aten/src -I/home/sim/**/20220714/pytorch/build/caffe2/../aten/src -I/home/sim/**/20220714/pytorch/torch/csrc -I/home/sim/**/20220714/pytorch/third_party/miniz-2.1.0 -I/home/sim/**/20220714/pytorch/third_party/kineto/libkineto/include -I/home/sim/**/20220714/pytorch/third_party/kineto/libkineto/src -I/home/sim/**/20220714/pytorch/torch/csrc/distributed -I/home/sim/**/20220714/pytorch/build/vulkan -I/home/sim/**/20220714/pytorch/aten/../third_party/catch/single_include -I/home/sim/**/20220714/pytorch/aten/src/ATen/.. -I/home/sim/**/20220714/pytorch/third_party/FXdiv/include -I/home/sim/**/20220714/pytorch/c10/.. -I/home/sim/**/20220714/pytorch/third_party/pthreadpool/include -I/home/sim/**/20220714/pytorch/third_party/cpuinfo/include -I/home/sim/**/20220714/pytorch/third_party/QNNPACK/include -I/home/sim/**/20220714/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/home/sim/**/20220714/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/home/sim/**/20220714/pytorch/third_party/cpuinfo/deps/clog/include -I/home/sim/**/20220714/pytorch/third_party/NNPACK/include -I/home/sim/**/20220714/pytorch/third_party/fbgemm/include -I/home/sim/**/20220714/pytorch/third_party/fbgemm -I/home/sim/**/20220714/pytorch/third_party/fbgemm/third_party/asmjit/src -I/home/sim/**/20220714/pytorch/third_party/ittapi/src/ittnotify -I/home/sim/**/20220714/pytorch/third_party/FP16/include -I/home/sim/**/20220714/pytorch/third_party/tensorpipe -I/home/sim/**/20220714/pytorch/build/third_party/tensorpipe -I/home/sim/**/20220714/pytorch/third_party/tensorpipe/third_party/libnop/include -I/home/sim/**/20220714/pytorch/third_party/fmt/include -I/home/sim/**/20220714/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/home/sim/**/20220714/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/home/sim/**/20220714/pytorch/third_party/flatbuffers/include -isystem /home/sim/**/20220714/pytorch/build/third_party/gloo -isystem /home/sim/**/20220714/pytorch/cmake/../third_party/gloo -isystem /home/sim/**/20220714/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /home/sim/**/20220714/pytorch/cmake/../third_party/googletest/googletest/include -isystem /home/sim/**/20220714/pytorch/third_party/protobuf/src -isystem /home/sim/**/20220714/pytorch/third_party/gemmlowp -isystem /home/sim/**/20220714/pytorch/third_party/neon2sse -isystem /home/sim/**/20220714/pytorch/third_party/XNNPACK/include -isystem /home/sim/**/vulkansdk-linux-x86_64-1.3.216.0/1.3.216.0/x86_64/include -isystem /home/sim/**/20220714/pytorch/third_party/ittapi/include -isystem /home/sim/**/20220714/pytorch/cmake/../third_party/eigen -isystem /home/sim/**/20220714/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /home/sim/**/20220714/pytorch/third_party/ideep/include -isystem /home/sim/**/20220714/pytorch/third_party/ideep/mkl-dnn/include -isystem /home/sim/**/20220714/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN -DUSE_VULKAN_API -DUSE_VULKAN_SHADERC_RUNTIME -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -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-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 -Wno-stringop-overflow -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -fPIC -DCAFFE2_USE_GLOO -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-maybe-uninitialized -fvisibility=hidden -O2 -fopenmp -DCAFFE2_BUILD_MAIN_LIB -pthread -DASMJIT_STATIC -std=gnu++14 -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/vulkan/ops/VulkanOpContext.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/vulkan/ops/VulkanOpContext.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/vulkan/ops/VulkanOpContext.cpp.o -c /home/sim/**/20220714/pytorch/aten/src/ATen/native/vulkan/ops/VulkanOpContext.cpp
In file included from /home/sim/**/20220714/pytorch/aten/src/ATen/core/List.h:483:0,
                 from /home/sim/**/20220714/pytorch/aten/src/ATen/core/ivalue_inl.h:9,
                 from /home/sim/**/20220714/pytorch/aten/src/ATen/core/ivalue.h:1369,
                 from /home/sim/**/20220714/pytorch/aten/src/ATen/core/function_schema.h:8,
                 from /home/sim/**/20220714/pytorch/aten/src/ATen/core/function.h:3,
                 from /home/sim/**/20220714/pytorch/aten/src/ATen/core/builtin_function.h:3,
                 from /home/sim/**/20220714/pytorch/torch/custom_class.h:3,
                 from /home/sim/**/20220714/pytorch/aten/src/ATen/native/vulkan/ops/VulkanOpContext.h:5,
                 from /home/sim/**/20220714/pytorch/aten/src/ATen/native/vulkan/ops/VulkanOpContext.cpp:1:
/home/sim/**/20220714/pytorch/aten/src/ATen/core/List_inl.h: In instantiation of ‘c10::List<T>::List(std::initializer_list<_Tp>) [with T = c10::IValue]’:
/home/sim/**/20220714/pytorch/aten/src/ATen/native/vulkan/ops/VulkanOpContext.cpp:11:58:   required from here
/home/sim/**/20220714/pytorch/aten/src/ATen/core/List_inl.h:42:3: error: static assertion failed: This constructor is not valid for List<IValue>. Please use c10::impl::GenericList(elementType).
   static_assert(!std::is_same<T, IValue>::value, "This constructor is not valid for List<IValue>. Please use c10::impl::GenericList(elementType).");
   ^~~~~~~~~~~~~
/home/sim/**/20220714/pytorch/aten/src/ATen/core/List_inl.h: In instantiation of ‘c10::List<T>::List(c10::ArrayRef<T>) [with T = c10::IValue]’:
/home/sim/**/20220714/pytorch/aten/src/ATen/core/List_inl.h:41:35:   required from ‘c10::List<T>::List(std::initializer_list<_Tp>) [with T = c10::IValue]’
/home/sim/**/20220714/pytorch/aten/src/ATen/native/vulkan/ops/VulkanOpContext.cpp:11:58:   required from here
/home/sim/**/20220714/pytorch/aten/src/ATen/core/List_inl.h:32:3: error: static assertion failed: This constructor is not valid for List<IValue>. Please use c10::impl::GenericList(elementType).
   static_assert(!std::is_same<T, IValue>::value, "This constructor is not valid for List<IValue>. Please use c10::impl::GenericList(elementType).");

### Versions


Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.6 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.22.5
Libc version: glibc-2.27

Python version: 3.9.2 (default, Jul  4 2022, 18:25:25)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.0-122-generic-x86_64-with-glibc2.27
Is CUDA available: N/A
CUDA runtime version: 11.3.58
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3080 Ti
Nvidia driver version: 470.129.06
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.4.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

Versions of relevant libraries:
[pip3] numpy==1.23.0
[conda] Could not collect

cc @malfet @seemethere