Repository: pytorch
Issue: Build Fail with vulkan on ARM64 and wayland drivers
Labels: module: build,triaged

## Issue description

Last master commit fails to build with vulkan enabled. 
I have used the USE_VULKAN=1 without google shaderc and i'm using ninja to build

Below there is the description of the error:

FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/Copy.cpp.o 
/usr/bin/c++  -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_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -Iaten/src -I../aten/src -I. -I../ -Icaffe2/contrib/aten -I../third_party/onnx -Ithird_party/onnx -I../third_party/foxi -Ithird_party/foxi -I../torch/csrc/api -I../torch/csrc/api/include -I../caffe2/aten/src/TH -Icaffe2/aten/src/TH -Icaffe2/aten/src -Icaffe2/../aten/src -Icaffe2/../aten/src/ATen -I../torch/csrc -I../third_party/miniz-2.0.8 -I../aten/src/TH -Ivulkan -I../aten/../third_party/catch/single_include -I../aten/src/ATen/.. -Icaffe2/aten/src/ATen -I../caffe2/core/nomnigraph/include -I../third_party/FXdiv/include -I../c10/.. -I../third_party/pthreadpool/include -I../third_party/cpuinfo/include -I../third_party/QNNPACK/include -I../aten/src/ATen/native/quantized/cpu/qnnpack/include -I../aten/src/ATen/native/quantized/cpu/qnnpack/src -I../third_party/cpuinfo/deps/clog/include -I../third_party/NNPACK/include -I../third_party/FP16/include -I../third_party/fmt/include -isystem ../third_party/protobuf/src -isystem ../third_party/gemmlowp -isystem ../third_party/neon2sse -isystem ../third_party/XNNPACK/include -isystem ../cmake/../third_party/eigen -isystem /usr/include/python3.8 -isystem /usr/local/lib/python3.8/dist-packages/numpy/core/include -isystem ../cmake/../third_party/pybind11/include -isystem include -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN -DUSE_VULKAN_API -DUSE_VULKAN_FP16_INFERENCE -DUSE_VULKAN_RELAXED_PRECISION -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -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 -O3 -DNDEBUG -DNDEBUG -fPIC   -march=native -D__NEON__ -DUSE_GCC_GET_CPUID -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-missing-braces -Wno-maybe-uninitialized -fvisibility=hidden -O2 -fopenmp -DCAFFE2_BUILD_MAIN_LIB -pthread -std=gnu++14 -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/Copy.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/Copy.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/Copy.cpp.o -c ../aten/src/ATen/native/Copy.cpp
In file included from ../aten/src/ATen/native/vulkan/api/Adapter.h:7,
                 from ../aten/src/ATen/native/vulkan/api/api.h:7,
                 from ../aten/src/ATen/native/vulkan/ops/Common.h:6,
                 from ../aten/src/ATen/native/vulkan/ops/Copy.h:5,
                 from ../aten/src/ATen/native/Copy.cpp:8:
../aten/src/ATen/native/vulkan/api/Shader.h:68:54: error: declaration of ‘typedef class at::native::vulkan::api::Handle<VkDescriptorSetLayout_T*, at::native::vulkan::api::destroy_DescriptorSetLayout> at::native::vulkan::api::Shader::Layout::Factory::Handle’ changes meaning of ‘Handle’ [-fpermissive]
   68 |       typedef Handle<VkDescriptorSetLayout, Deleter> Handle;


- PyTorch: 1.8.0a0 (latest master)
- Build command you used (if compiling from source): MAX_JOBS=1 python3 setup.py install
- OS: Ubuntu 20.04
- Python version: 3.8.3
- GPU models and configuration: Mali with Wayland bifrost drivers
- GCC version (if compiling from source): 9.3
- CMake version: 3.16
- Versions of any other relevant libraries: Ninja


cc @malfet @seemethere @walterddr