Skip to content

Compilation failed in cuda_piMemBufferPartition: type qualifiers ignored on cast result type #1837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
christgau opened this issue Jun 8, 2020 · 2 comments

Comments

@christgau
Copy link

On CentOS 7 with a "self-made" GCC 9.1 and CMake 3.16.4, I observe an compilation error:

/home/christgau/src/intel/llvm/src/sycl/plugins/cuda/pi_cuda.cpp: In function ‘pi_result cuda_piMemBufferPartition(pi_mem, pi_mem_flags, pi_buffer_create_type, void*, _pi_mem**)’:
/home/christgau/src/intel/llvm/src/sycl/plugins/cuda/pi_cuda.cpp:1623:67: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
       *reinterpret_cast<const pi_buffer_region>(buffer_create_info);
                                                                   ^
cc1plus: all warnings being treated as errors

The mentioned line was introduced with 249e57b.

I use the buildbot scripts to configure and build the compiler.

SYCL_HOME=$HOME/src/intel/llvm

build_dir=$SYCL_HOME/build

mkdir -p $build_dir

python $SYCL_HOME/src/buildbot/configure.py -s "$SYCL_HOME/src" -o "$build_dir" --cuda --cmake-opt="-DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda/10.1"
python $SYCL_HOME/src/buildbot/compile.py -s "$SYCL_HOME/src" -o "$build_dir"

However when I compile with cmake as documented in older versions of the "Getting Started" Guide it compiles wihtout error. Maybe this is because of a more strict compilation mode in the buildbot scripts (no_werror=False).

@hiaselhans
Copy link
Contributor

I think there are a bunch of these warnings in different/newer versions of gcc. See #1572 and others ...

quick fix is to use the buildbot scripts with --no-werror. does it help...?

@christgau
Copy link
Author

quick fix is to use the buildbot scripts with --no-werror. does it help...?

Yes. It does. Also --no-assertions was helpful in my case as quick'n'dirty workaround for #1467.

Thanks. Closing this one...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants