Skip to content

[CUDA] Build error in imageElementByteSize #3550

@Pennycook

Description

@Pennycook

Describe the bug
Trying to build the CUDA backend fails with the following error:

/home/sjpennyc/llvm/sycl/plugins/cuda/pi_cuda.cpp: In function ‘size_t imageElementByteSize(CUDA_ARRAY_DESCRIPTOR)’:
/home/sjpennyc/llvm/sycl/plugins/cuda/pi_cuda.cpp:3824:10: error: enumeration value ‘CU_AD_FORMAT_NV12’ not handled in switch [-Werror=switch]
   switch (array_desc.Format) {
          ^
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-covered-switch-default’ [-Werror]
cc1plus: all warnings being treated as errors

I've added a default to the switch statement locally to work around this, but the error about -Wno-covered-switch-default suggests to me that this is a violation of some style guide and some other fix is expected.

To Reproduce
Build with:

python3 ../buildbot/configure.py --cuda -t Release
ninja

Environment:

  • OS: Ubuntu 18.04
  • C/CXX Compiler: GNU 7.5.0
  • CUDA Version: 11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    cudaCUDA back-endenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions