NVIDIA / cuCollections

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: build error when cmake apply libcudacxx patch

gamdwk opened this issue · comments

commented

Is this a duplicate?

Type of Bug

Compile-time Error

Describe the bug

when I use cmake to build the example, It raise:

-- CPM: Adding package cuco@ (dev)
-- CPM: cuco: Using local package Thrust@1.17.2.0
-- CPM: cuco: Adding package libcudacxx@2.1.0 (2.1.0)
-- rapids-cmake [libcudacxx]: failed to apply diff install_rules.diffrapids-cmake [libcudacxx]: git diff output: error: patch failed: cmake/libcudacxxInstallRules.cmake:28
-- error: cmake/libcudacxxInstallRules.cmake: patch does not apply
-- error: patch failed: lib/cmake/libcudacxx/libcudacxx-header-search.cmake.in:1
-- error: lib/cmake/libcudacxx/libcudacxx-header-search.cmake.in: patch does not apply
-- 
-- rapids-cmake [libcudacxx]: applied diff reroot_support.diff to fix issue: 'Support conda-forge usage of CMake rerooting [https://github.com/NVIDIA/libcudacxx/pull/490], requires libcudacxx/install_rules.diff.'
-- rapids-cmake [libcudacxx]: applied diff proclaim_return_type_nv_exec_check_disable.diff to fix issue: 'Use pragma to disable execution checks in cuda::proclaim_return_type. [https://github.com/NVIDIA/libcudacxx/pull/448]'
-- rapids-cmake [libcudacxx]: applied diff memory_resource.diff to fix issue: 'Allow {async_}resource_ref to be constructible from a pointer. [https://github.com/NVIDIA/libcudacxx/pull/439]'
-- Configuring done (3.1s)
-- Generating done (0.0s)

and then I compile:

/cache/build/_deps/cuco-src/include/cuco/detail/__config:28:2: error: #error "Support for relaxed constexpr is required"
   28 | #error "Support for relaxed constexpr is required"
      |  ^~~~~
/cache/build/_deps/cuco-src/include/cuco/detail/__config:32:2: error: #error "Support for extended device lambdas is required"
   32 | #error "Support for extended device lambdas is required"
      |  ^~~~~
make[2]: *** [CMakeFiles/cache_gcn.dir/build.make:77: CMakeFiles/cache_gcn.dir/cache.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:133: CMakeFiles/cache_gcn.dir/all] Error 2
make: *** [Makefile:136: all] Error 2


How to fix it?


### How to Reproduce

just cmake ..

### Expected behavior

It can be compile correctly.

### Reproduction link

_No response_

### Operating System

Ubuntu Linux 20.04 and nvcr.io/nvidia/nvhpc:23.9-devel-cuda_multi-ubuntu20.04

### nvidia-smi output

I use nvidia  official docker container with nvidia Hpc Sdk 23.9 ,so the CUDA Version is not same with nvcc.
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.105.01   Driver Version: 515.105.01   CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA A100 80G...  Off  | 00000000:31:00.0 Off |                    0 |
| N/A   36C    P0    44W / 300W |      0MiB / 81920MiB |      0%      Default |
|                               |                      |             Disabled |
+-------------------------------+----------------------+----------------------+
|   1  NVIDIA A800 80G...  Off  | 00000000:4B:00.0 Off |                    0 |
| N/A   40C    P0    50W / 300W |      0MiB / 81920MiB |      0%      Default |
|                               |                      |             Disabled |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

### NVCC version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0

Thanks for reporting the issue.

There was a relevant discussion here #391. Essentially, our code relies on relaxed lambda and constexpr expressions thus building with --expt-extended-lambda --expt-relaxed-constexpr options is necessary.

commented

Thanks! It can be compiled now.but the cmake build error still exists. So It means this error can be ignore?

Yes, those are falsely flagged as errors it seems. I'll ping the maintainers of our build ecosystem to see if we can get this resolved. Meanwhile I opened #398 which now prints a hint about which compiler flags are missing during build.

Resolved.